A cloud-edge collaborative PID parameter determination method and system
Through the PID parameter determination method of cloud-edge collaboration, the controlled object model is constructed in the cloud and updated in real time, which solves the problem of poor control effect caused by the high consumption of computing resources of the intelligent control algorithm and network delay, and realizes the real-time PID parameter adjustment of the edge controller. and improved control effects.
Patent Information
- Application Number
- CN202211069379.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-01
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2042-09-01
AI Technical Summary
Existing methods for determining PID parameters based on big data use intelligent control algorithms in the cloud, which results in long calculation times, high consumption of storage resources, and poor control effects due to network delays and failures.
Using the cloud-edge collaboration method, the controlled object model is constructed in the cloud and transmitted to the edge controller. By updating the model parameters in real time, the excitation signal is used to determine the PID parameters to avoid the impact of network delays and failures.
It realizes real-time adjustment of PID parameters in the edge controller, improves the control effect, and avoids poor control problems caused by network problems.
Smart Images

Figure CN115421374B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of automatic control technology, and in particular to a cloud-edge collaborative PID parameter determination method and system. Background Art
[0002] At present, the method for determining the PID (proportion-integral-differential) parameters of the controlled object based on big data requires the use of intelligent control algorithms. However, intelligent control algorithms have the characteristics of long calculation time, high consumption of storage resources and strong parallelism, and cannot be directly applied in PID controllers.
[0003] To solve the above problems, the commonly used method is to use intelligent control algorithms in the cloud to determine the PID parameters, and then transmit the PID parameters to the edge controller through the industrial Internet. However, if the industrial Internet encounters network delays, network failures and other problems, the controller cannot obtain the PID parameters in time, resulting in poor control effects. Summary of the invention
[0004] The purpose of the embodiment of the present invention is to provide a cloud-edge collaborative PID parameter determination method and system. The specific technical solution is as follows:
[0005] The present invention provides a cloud-edge collaborative PID parameter determination method, which is applied to an edge controller. The method includes:
[0006] Obtaining a controlled object model constructed by the cloud based on input-output data of the controlled object at multiple historical moments; wherein the controlled object model reflects the corresponding relationship between the input data and the output data of the controlled object;
[0007] With the goal of minimizing the difference between the output data of the controlled object at a current moment and the output data of the controlled object model at a previous moment, the controlled object model is updated to obtain an updated model;
[0008] An excitation signal is input into the updated model, a signal amplitude of a response signal output by the updated model is obtained, and a PID parameter is determined based on the signal amplitude of the excitation signal and the signal amplitude of the response signal.
[0009] Optionally, the method for constructing the controlled object model includes:
[0010] Performing clustering processing on the input data at multiple historical moments to obtain multiple types of first data features;
[0011] Dividing the input-output data at each historical moment according to the first data feature to obtain a plurality of divided data sets; the number of the divided data sets is the same as the total number of types of the first data feature;
[0012] The model parameters of the fuzzy cognitive map model are trained using the divided data set to obtain the controlled object model; the fuzzy cognitive map model includes multiple first input nodes and an output node, the first input nodes represent the divided data set, the output nodes represent the output of the controlled object, and the model parameters represent the relationship between the nodes.
[0013] Optionally, after obtaining the multiple divided data sets, the method further includes:
[0014] Performing clustering processing on the input data in the divided data set to obtain multiple types of second data features;
[0015] Dividing the input-output data of the data set according to the second data feature to obtain a plurality of secondary divided data sets; the number of the secondary divided data sets is the same as the total number of types of the second data feature;
[0016] The method of using the divided data set to train the model parameters of the fuzzy cognitive map model to obtain the controlled object model includes:
[0017] The model parameters of the fuzzy cognitive map model are trained using the data set after the secondary division to obtain the controlled object model.
[0018] Optionally, the using the data set after the secondary division to train the model parameters of the fuzzy cognitive map model to obtain the controlled object model includes:
[0019] Constructing a plurality of fuzzy cognitive map sub-models; wherein the number of the fuzzy cognitive map sub-models is the same as the number of the divided data sets; the fuzzy cognitive map sub-models comprises a plurality of second input nodes and one output node, wherein the second input node represents the data set after the secondary division;
[0020] Using the data set after the secondary division to train the model parameters of the fuzzy cognitive map sub-model, to obtain a plurality of controlled object sub-models;
[0021] Performing weighted fusion on the model parameters of the plurality of controlled object sub-models to obtain fused model parameters;
[0022] The controlled object model is generated based on the fused model parameters, a plurality of the second input nodes and one output node.
[0023] Optionally, performing weighted fusion on the model parameters of the plurality of sub-models of the controlled object to obtain fused model parameters includes:
[0024] Determining the membership of the input data of the controlled object at a historical moment to each of the divided data sets;
[0025] Compare the multiple memberships to obtain the maximum membership, and use the maximum membership as a weight;
[0026] The weight is used as a weighted coefficient of the model parameter of the sub-model of the controlled object, and a weighted fusion method is adopted to obtain the fused model parameter.
[0027] Optionally, clustering the input data at multiple historical moments to obtain multiple types of first data features includes:
[0028] Performing fuzzy C-means clustering on the input data of multiple historical moments to obtain a membership matrix; the rows of the membership matrix represent a type of first data feature, the number of rows of the membership matrix is the same as the number of types of the first data feature, and the number of columns of the membership matrix is the same as the total number of the historical moments;
[0029] The input-output data at each historical moment is divided according to the first data feature to obtain a plurality of divided data sets, including:
[0030] For the input-output data at each historical moment, the maximum value is found from the corresponding column in the membership matrix, the type of the first data feature corresponding to the maximum value is used as the type of the input-output data at the historical moment, and the input-output data of the same type are aggregated into one data set to obtain multiple divided data sets.
[0031] Optionally, the updating of the controlled object model with the goal of minimizing the difference between the output data of the controlled object at the current moment and the output data of the controlled object model at the previous moment to obtain the updated model includes:
[0032] With the goal of minimizing the difference between the output data of the controlled object at the current moment and the output data of the controlled object model at the previous moment, a gradient method is used to obtain incremental data of the model parameters of the controlled object model;
[0033] Updating model parameters of the controlled object model based on the incremental data to obtain updated model parameters;
[0034] The updated model parameters are used as model parameters of the controlled object model to obtain an updated model.
[0035] The present invention also provides a cloud-edge collaborative PID parameter determination system, which is applied to an edge controller. The system includes:
[0036] A controlled object model acquisition module, used to obtain a controlled object model constructed by the cloud based on input-output data of the controlled object at multiple historical moments; wherein the controlled object model reflects the corresponding relationship between the input data and the output data of the controlled object;
[0037] A model updating module, configured to update the controlled object model with the goal of minimizing the difference between the output data of the controlled object at a current moment and the output data of the controlled object model at a previous moment, thereby obtaining an updated model;
[0038] The PID parameter determination module is used to input the excitation signal into the updated model, obtain the signal amplitude of the response signal output by the updated model, and determine the PID parameters based on the signal amplitude of the excitation signal and the signal amplitude of the response signal.
[0039] The present invention also provides a computer-readable storage medium, on which a program is stored. When the program is executed by a processor, the above-mentioned cloud-edge collaborative PID parameter determination method is implemented.
[0040] The present invention also provides an electronic device, comprising:
[0041] At least one processor, and at least one memory and bus connected to the processor;
[0042] The processor and the memory communicate with each other through the bus; the processor is used to call the program instructions in the memory to execute the above-mentioned cloud-edge collaborative PID parameter determination method.
[0043] An embodiment of the present invention provides a cloud-edge collaborative PID parameter determination method, system, storage medium and electronic device, which updates the controlled object model stored in the edge controller through the input-output data obtained in real time by the edge controller, and then adjusts the PID parameters. Compared with the prior art of directly transmitting PID parameters through the cloud, it can avoid the problem of poor control effect caused by the inability to obtain the PID parameters transmitted from the cloud in time due to network delays, network failures and other problems in the industrial Internet.
[0044] Of course, it is not necessary to achieve all of the advantages described above at the same time to implement any product or method of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0046] Figure 1 A flow chart of a method for determining PID parameters for cloud-edge collaboration provided in an embodiment of the present invention;
[0047] Figure 2 A schematic diagram of input and output of a controlled object provided by an embodiment of the present invention;
[0048] Figure 3 A schematic diagram of a fuzzy cognitive graph sub-model provided by an embodiment of the present invention;
[0049] Figure 4 A framework diagram for determining PID parameters provided by an embodiment of the present invention;
[0050] Figure 5 A framework diagram of cloud-edge collaboration to achieve PID parameter determination provided by an embodiment of the present invention;
[0051] Figure 6 A structural diagram of a PID parameter determination system for cloud-edge collaboration provided in an embodiment of the present invention;
[0052] Figure 7 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0053] 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.
[0054] The present invention provides a cloud-edge collaborative PID parameter determination method, which is applied to an edge controller, such as Figure 1 As shown, the method comprises:
[0055] Step 101: Obtain a controlled object model constructed by the cloud based on input-output data of the controlled object at multiple historical moments; wherein the controlled object model reflects the corresponding relationship between the input data and the output data of the controlled object.
[0056] The edge controller uploads the input-output data of the controlled object at multiple moments to the cloud. The cloud receives the input-output data of the controlled object at multiple historical moments and can use these data to build a model in the cloud to obtain the controlled object model. The controlled object model built on the cloud can simulate the actual operation process of the controlled object, and input the input data into the controlled object model. The error between the output data of the controlled object model and the output data of the actual controlled object under the same input conditions is within the allowable error range, that is, the controlled object model can reflect the corresponding relationship between the input data and the output data of the controlled object.
[0057] Since building a controlled object model requires large amounts of computation, takes a long time to calculate, and consumes a lot of storage resources, the present invention adopts a cloud-edge collaborative approach to carry out the process of building the controlled object model in the cloud. After the controlled object model is built in the cloud, it is sent to the edge controller to determine the PID parameters, which can meet the limited storage resource requirements of the PID controller.
[0058] Step 102: With the goal of minimizing the difference between the output data of the controlled object at the current moment and the output data of the controlled object model at the previous moment, the controlled object model is updated to obtain an updated model.
[0059] The cloud transmits the controlled object model to the edge controller, and the edge controller can use the output data of the controlled object at the current moment to update the controlled object model in order to update the PID parameters. When updating the model, the input data of the controlled object at the previous moment can be input into the controlled object model to obtain the output data of the controlled object model at the previous moment, and then the actual output data of the controlled object at the current moment can be obtained. The model parameters of the controlled object model are adjusted with the goal of minimizing the difference between the two output data. After obtaining the updated model parameters, the update of the controlled object model is completed, and the controlled object model with the adjusted model parameters is obtained.
[0060] As an optional implementation, the controlled object model is updated with the goal of minimizing the difference between the output data of the controlled object at the current moment and the output data of the controlled object model at the previous moment to obtain an updated model, including:
[0061] With the goal of minimizing the difference between the output data of the controlled object at the current moment and the output data of the controlled object model at the previous moment, the gradient method is used to obtain the incremental data of the model parameters of the controlled object model;
[0062] updating model parameters of the controlled object model based on the incremental data to obtain updated model parameters;
[0063] The updated model parameters are used as the model parameters of the controlled object model to obtain an updated model.
[0064] Step 103: Input the excitation signal into the updated model, obtain the signal amplitude of the response signal output by the updated model, and determine the PID parameters based on the signal amplitude of the excitation signal and the signal amplitude of the response signal.
[0065] The excitation signal can be a sinusoidal excitation signal, which is input into the updated model, and the updated model outputs a response signal to obtain the signal amplitude of the response signal. Then, the system identification method can be used to determine the PID parameters based on the signal amplitude of the excitation signal and the signal amplitude of the response signal.
[0066] The present invention updates the controlled object model stored in the edge controller through the input-output data obtained in real time by the edge controller, and then adjusts the PID parameters. Compared with the prior art of directly transmitting PID parameters through the cloud, it can avoid the problem of poor control effect caused by the inability to obtain the PID parameters transmitted from the cloud in time due to network delays, network failures and other problems in the industrial Internet.
[0067] As an optional implementation, when constructing a controlled object model in the cloud, the method for constructing the controlled object model may include:
[0068] Performing clustering processing on input data at multiple historical moments to obtain multiple types of first data features;
[0069] The input-output data at each historical moment is divided according to the first data feature to obtain a plurality of divided data sets; the number of the divided data sets is the same as the total number of types of the first data feature;
[0070] The divided data set is used to train the model parameters of the fuzzy cognitive map model to obtain the controlled object model; the fuzzy cognitive map model includes multiple first input nodes and an output node, the first input node represents the divided data set, the output node represents the output of the controlled object, and the model parameters represent the relationship between the nodes.
[0071] like Figure 2 As shown in the figure, it is a schematic diagram of the input and output of the controlled object. Figure 2 As shown, the historical data of the operation of the controlled object is used to form an input-output data set D = {(x k ,y k )|x k ∈R n ,y k ∈R,k=1,2,…,N}, R represents a real number, and the input variable is x k =(x k1 ,x k2 ,…,x kn ), where x k1 ,xk2 ,…,x kn is the n input variables of the controlled object at the kth moment. k It is the output variable of the controlled object at the kth moment.
[0072] The controlled object may be a distillation tower, the input variables may include but are not limited to the tower top pressure, tower bottom liquid level, feed flow rate, reflux tank liquid level, and the output variable may be the component purity of the tower top product.
[0073] Optionally, the method of clustering the input data of multiple historical moments to obtain multiple types of first data features may include: performing fuzzy C-means clustering on the input data of multiple historical moments to obtain a membership matrix; the rows of the membership matrix represent one type of first data feature, the number of rows of the membership matrix is the same as the number of types of first data features, and the number of columns of the membership matrix is the same as the total number of historical moments.
[0074] The input variable x of the data set D k Perform fuzzy C-means clustering to obtain the membership matrix. Assuming the number of clusters is C, after clustering the data set D, a C×N-dimensional membership matrix A and C prototypes P1, P2, …P C .
[0075]
[0076] The row μ of the membership matrix A 11 , μ 12 …μ 1N Representing the first data features of the same type, different rows of the membership matrix A represent different types of first data features. There are a total of C types of first data features. The number of columns in the membership matrix is the same as the total number of historical moments, both N, μ CN For the input data x kn The degree of membership of the first data feature of the Cth type at the Nth moment.
[0077] Optionally, dividing the input-output data of each historical moment according to the first data feature to obtain multiple divided data sets may include: for the input-output data of each historical moment, finding the maximum value from the corresponding column in the membership matrix, taking the type of the first data feature corresponding to the maximum value as the type of the input-output data at the historical moment, and aggregating the input-output data of the same type into one data set to obtain multiple divided data sets.
[0078] For each column of the membership matrix A, such as μ 11 , μ 21 …μ C1 , compare these memberships to obtain the maximum membership value. If the maximum membership value is μ21 , then μ 21 The type of the corresponding first data feature is used as the type of input-output data at the historical moment, and the same type of input-output data is aggregated into one data set to obtain multiple divided data sets. The divided data sets can be divided into information granules. i , i = 1, 2, ..., C, and the divided data sets are recorded as Ω1, Ω2, ..., Ω C For information particles Ω i , which contains the data For prototypes P1, P2, ...P C For example, each prototype represents an information particle Ω i The data is wrapped in such a way that data compression is achieved.
[0079] Optionally, after obtaining the multiple divided data sets, the method further includes:
[0080] Performing clustering processing on the input data in the divided data set to obtain multiple types of second data features;
[0081] The input-output data of the data set is divided according to the second data feature to obtain a plurality of secondary divided data sets; the number of the secondary divided data sets is the same as the total number of types of the second data feature.
[0082] In order to further compress the data, after obtaining the divided data set, the clustering operation can be performed again in the same way as above to obtain multiple secondary divided data sets. That is, each information particle Ω i After clustering and partitioning, C i Prototype
[0083] Optionally, using the divided data set to train model parameters of the fuzzy cognitive map model to obtain the controlled object model includes: using the data set after secondary division to train model parameters of the fuzzy cognitive map model to obtain the controlled object model.
[0084] Furthermore, the model parameters of the fuzzy cognitive graph model are trained using the data set after secondary division to obtain the controlled object model, including:
[0085] Constructing multiple fuzzy cognitive map sub-models; wherein the number of the fuzzy cognitive map sub-models is the same as the number of the divided data sets; the fuzzy cognitive map sub-models includes multiple second input nodes and one output node, and the second input node represents the data set after the secondary division;
[0086] The model parameters of the fuzzy cognitive graph sub-model are trained using the data set after the secondary division to obtain multiple controlled object sub-models;
[0087] Performing weighted fusion on the model parameters of multiple controlled object sub-models to obtain fused model parameters;
[0088] A controlled object model is generated based on the fused model parameters, a plurality of second input nodes and an output node.
[0089] When constructing multiple fuzzy cognitive graph sub-models, each information particle Ω i After clustering and partitioning, C i Prototype The C i The prototype is used as the sub-model of fuzzy cognitive graph. i nodes, so that the output of the controlled object becomes the C of the fuzzy cognitive graph sub-model i +1 node, denoted as y i Among them, the nodes of the fuzzy cognitive graph sub-model include the second input node (i.e., C i prototypes) and an output node (i.e., y i ), the second input node represents the data set after secondary division. Figure 3 As shown in the figure, it is a schematic diagram of the fuzzy cognitive graph sub-model. Assuming that the information particle Ω i After clustering and partitioning, three prototypes are generated. The output node is y i . So for information particles Ω i , the corresponding fuzzy cognitive graph submodel FCM i is formed. Figure 3 Medium mn Represents the weight between nodes, m=1, 2, 3, n=1, 2, 3, 4.
[0090] For the fuzzy cognitive graph submodel FCM i , information particles can be used i The enveloping data, learning model parameters.
[0091] First, using information particles Ω i The input and output parts of the enveloped data are calculated according to the following formula i The output of each node in the model is then calculated Output Right now:
[0092]
[0093] in,
[0094]
[0095]
[0096] In the formula, k i =1,2,…,N i , N i is the information particle Ω i At the Nth moment, C i The constructed fuzzy cognitive graph submodel FCM i The number of nodes in the lj ∈[-1,+1] is the node C l and node C j The weight parameter between 0l ∈[-1, +1] is the node C l The relevant coordination parameters, is the jth (j=1, 2, ...C i ) nodes to the output node y of the controlled object i The weight parameter, Fuzzy cognitive graph model FCM i The first (l = 1, 2, ... C i ) nodes In the kth i The output value at time, Fuzzy cognitive graph model FCM i The jth (j=1, 2, ...C i ) nodes The output value at the k+1th moment, ∈ is the adjustment parameter. The subscript i in the above formula represents the information particle Ω i Correspondingly, if it is information particle Ω1, the subscript i=1. is the sth node, and ||·|| represents the norm.
[0097] The model parameters of the fuzzy cognitive graph sub-model include: lj ,ω 0l and In order to make the generated fuzzy cognitive graph sub-model approximate the corresponding output according to the input data it envelops, it is necessary to use the optimization method to obtain the optimal model parameter w in the fuzzy cognitive graph sub-model. i :
[0098]
[0099] Optionally, using the secondary divided data set to train the model parameters of the fuzzy cognitive map sub-model to obtain multiple controlled object sub-models may include: optimizing the model parameters by using an optimization algorithm, such as an ant colony algorithm or a genetic algorithm, with the goal of minimizing the difference between the model output and the actual output of the controlled object.
[0100] The objective function can be:
[0101]
[0102] The above method is used to train the model parameters of the fuzzy cognitive graph sub-model using the data set after secondary division to obtain multiple controlled object sub-models, that is, for information particles Ω1, Ω2, ..., Ω C , and its corresponding fuzzy cognitive graph sub-models FCM1, FCM2, ..., FCM C After the model parameters are trained according to the objective function as above, multiple controlled object sub-models are obtained.
[0103] Optionally, weighted fusion is performed on model parameters of multiple controlled object sub-models to obtain fused model parameters, including:
[0104] Determine the membership of the input data of the controlled object at a historical moment to each divided data set;
[0105] Compare multiple memberships, obtain the maximum membership, and use the maximum membership as the weight;
[0106] The weights are used as weighted coefficients of the model parameters of the sub-model of the controlled object, and the fused model parameters are obtained using a weighted fusion method.
[0107] Assume W i is the i-th information particle Ω i (i=1,2,…,C) Fuzzy cognitive graph submodel FCM obtained through training i The model parameters w i The matrix representation of
[0108]
[0109] The fusion model is as follows:
[0110] if x∈DS i , then W Global =W i , i=1,2,…,C
[0111] Among them, DS i is i information particles Ω i The input data set enclosed, W Global is the final model weight matrix.
[0112] When x k When inputting to the fusion model, first calculate x k DS i The membership degree u ki :
[0113]
[0114] in:
[0115] Then, the fusion weights are calculated as follows:
[0116]
[0117] W obtained by weighted fusion method Global It can be expressed as:
[0118]
[0119] The cloud can i Prototype and the corresponding weight matrix W Global Pushed to the edge controller via the Industrial Internet.
[0120] Optionally, the controlled object model is updated with the goal of minimizing the difference between the output data of the controlled object at the current moment and the output data of the controlled object model at the previous moment to obtain an updated model, including:
[0121] With the goal of minimizing the difference between the output data of the controlled object at the current moment and the output data of the controlled object model at the previous moment, the gradient method is used to obtain the incremental data of the model parameters of the controlled object model;
[0122] updating model parameters of the controlled object model based on the incremental data to obtain updated model parameters;
[0123] The updated model parameters are used as the model parameters of the controlled object model to obtain an updated model.
[0124] Specifically, the edge controller samples the data at T time points from the input and output of the controlled object to form an input and output data set D = {(x t ,y t )|x t ∈R n ,y t ∈R, t=1, 2,…,T}.
[0125] Using the gradient method to solve To W Global Perform incremental updates.
[0126] Among them, ΔW is the weight increment matrix of the fuzzy cognitive graph model, that is:
[0127]
[0128] O t is the fuzzy cognitive graph model for the input x at time t-1 t-1 The output is:
[0129]
[0130] in,
[0131]
[0132]
[0133] w lj =ω lj +Δω lj
[0134] w 0t =ω 0l +Δω 0l
[0135] Using formula W Local =W Global +ΔW to obtain the updated model parameters W Local :
[0136]
[0137] As an optional implementation, the excitation signal is input into the updated model, the signal amplitude of the response signal output by the updated model is obtained, and the PID parameters are determined based on the signal amplitude of the excitation signal and the signal amplitude of the response signal. The specific process is as follows:
[0138] The excitation signal program in the edge controller generates a sinusoidal excitation signal Signal=Asin(wt), where A is the amplitude of the sinusoidal signal and w is the angular frequency.
[0139] Using the fuzzy cognitive graph model pushed by the cloud, the generated sinusoidal excitation signal Signal is used as the input of the model, and the signal amplitude B of the response signal output by the updated model is calculated according to the following formula: k .
[0140]
[0141] in:
[0142]
[0143] Then, according to Table 1, calculate the PID controller parameters: proportional gain KP, integral gain KI and differential gain KD.
[0144] Table 1 PID controller parameters
[0145]
[0146] The PID controller parameters are input into the input pins KP, KI and KD of the PID controller to realize the self-tuning PID control of the manufacturing unit.
[0147] After time T+1, repeat the edge model update, that is, use the generated sinusoidal excitation signal Signal as the input of the model, and calculate B according to the above formula k .
[0148] like Figure 4 As shown, the cloud transmits the controlled object model to the edge controller through the industrial Internet, and the edge controller and the industrial Internet transmit data through MQTT (Message Queuing Telemetry Transport). The model parameters, input data and output data of the controlled object, as well as the number of iterations and the running time are input into the PID self-tuning function block to obtain the PID controller parameters KP, KI and KD. The PID controller parameters are input into the input pins KP, KI and KD of the PID controller to realize the self-tuning PID control of the manufacturing unit.
[0149] like Figure 5 As shown, it is a framework diagram of the cloud-edge collaboration to realize PID parameter determination of the present invention. In the cloud, the input-output industrial big data generated by the controlled object is compressed based on granular computing, that is, the data is clustered and feature-divided to obtain multiple information granules, namely granule representation 1, granule representation 2, ..., granule representation n. A fuzzy cognitive map sub-model is constructed for each information granule to obtain fuzzy cognitive map model 1, fuzzy cognitive map model 2, ..., fuzzy cognitive map model n. Then, model parameter learning is performed on each model, and then the fuzzy cognitive map models are fused to obtain a trained fuzzy cognitive map model, that is, a controlled object model. The trained fuzzy cognitive map model is transmitted to the edge controller through the industrial Internet. The edge controller obtains the input data and output data of the controlled object, that is, after the edge data is input into the trained fuzzy cognitive map model, the output of the controlled object model is sampled, and the identification PID parameters are obtained through the excitation signal, that is, the proportional gain KP, the integral gain KI and the differential gain KD are obtained. After the PID parameters are passed into the PID function block, the controlled object is controlled.
[0150] The present invention also provides a cloud-edge collaborative PID parameter determination system, which is applied to an edge controller, such as Figure 6 As shown, the system comprises:
[0151] The controlled object model acquisition module 601 is used to obtain a controlled object model constructed by the cloud based on the input-output data of the controlled object at multiple historical moments; wherein the controlled object model reflects the corresponding relationship between the input data and the output data of the controlled object.
[0152] The model updating module 602 is used to update the controlled object model with the goal of minimizing the difference between the output data of the controlled object at the current moment and the output data of the controlled object model at the previous moment to obtain an updated model.
[0153] The PID parameter determination module 603 is used to input the excitation signal into the updated model, obtain the signal amplitude of the response signal output by the updated model, and determine the PID parameters based on the signal amplitude of the excitation signal and the signal amplitude of the response signal.
[0154] The controlled object model acquisition module 601 specifically includes:
[0155] The plant model building unit is used to:
[0156] Performing clustering processing on input data at multiple historical moments to obtain multiple types of first data features;
[0157] The input-output data at each historical moment is divided according to the first data feature to obtain a plurality of divided data sets; the number of the divided data sets is the same as the total number of types of the first data feature;
[0158] The divided data set is used to train the model parameters of the fuzzy cognitive map model to obtain the controlled object model; the fuzzy cognitive map model includes multiple first input nodes and an output node, the first input node represents the divided data set, the output node represents the output of the controlled object, and the model parameters represent the relationship between the nodes.
[0159] Optionally, clustering is performed on input data at multiple historical moments to obtain multiple types of first data features, including:
[0160] Perform fuzzy C-means clustering on the input data of multiple historical moments to obtain a membership matrix; the rows of the membership matrix represent a type of first data feature, the number of rows of the membership matrix is the same as the number of types of the first data feature, and the number of columns of the membership matrix is the same as the total number of historical moments;
[0161] The input-output data at each historical moment is divided according to the first data feature to obtain multiple divided data sets, including:
[0162] For the input-output data at each historical moment, the maximum value is found from the corresponding column in the membership matrix, and the type of the first data feature corresponding to the maximum value is used as the type of the input-output data at the historical moment. The input-output data of the same type are aggregated into one data set to obtain multiple divided data sets.
[0163] The controlled object model obtaining module 601 further includes:
[0164] The data compression unit is used to cluster the input data in the divided data sets after obtaining multiple divided data sets to obtain multiple types of second data features; divide the input-output data of the data sets according to the second data features to obtain multiple secondary divided data sets; the number of the secondary divided data sets is the same as the total number of types of the second data features; and use the secondary divided data sets to train the model parameters of the fuzzy cognitive map model to obtain a controlled object model.
[0165] Optionally, the model parameters of the fuzzy cognitive map model are trained using the data set after the secondary division to obtain the controlled object model, including:
[0166] Constructing multiple fuzzy cognitive map sub-models; wherein the number of the fuzzy cognitive map sub-models is the same as the number of the divided data sets; the fuzzy cognitive map sub-models includes multiple second input nodes and one output node, and the second input node represents the data set after the secondary division;
[0167] The model parameters of the fuzzy cognitive graph sub-model are trained using the data set after the secondary division to obtain multiple controlled object sub-models;
[0168] Performing weighted fusion on the model parameters of multiple controlled object sub-models to obtain fused model parameters;
[0169] A controlled object model is generated based on the fused model parameters, a plurality of second input nodes and an output node.
[0170] Among them, the model parameters of multiple controlled object sub-models are weighted and fused to obtain the fused model parameters, including:
[0171] Determine the membership of the input data of the controlled object at a historical moment to each divided data set;
[0172] Compare multiple memberships, obtain the maximum membership, and use the maximum membership as the weight;
[0173] The weights are used as weighted coefficients of the model parameters of the sub-model of the controlled object, and the fused model parameters are obtained using a weighted fusion method.
[0174] The model updating module 602 is specifically used for:
[0175] With the goal of minimizing the difference between the output data of the controlled object at the current moment and the output data of the controlled object model at the previous moment, the gradient method is used to obtain the incremental data of the model parameters of the controlled object model;
[0176] updating model parameters of the controlled object model based on the incremental data to obtain updated model parameters;
[0177] The updated model parameters are used as the model parameters of the controlled object model to obtain an updated model.
[0178] An embodiment of the present invention provides a computer-readable storage medium on which a program is stored. When the program is executed by a processor, the above-mentioned cloud-edge collaborative PID parameter determination method is implemented.
[0179] An embodiment of the present invention provides an electronic device, such as Figure 7 As shown, the electronic device 70 includes at least one processor 701, and at least one memory 702 and a bus 703 connected to the processor 701; wherein the processor 701 and the memory 702 communicate with each other through the bus 703; the processor 701 is used to call the program instructions in the memory 702 to execute the above-mentioned cloud-edge collaborative PID parameter determination method. The electronic device in this article can be a server, a PC, a PAD, a mobile phone, etc.
[0180] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing a program that initializes the steps included in the above-mentioned cloud-edge collaborative PID parameter determination method.
[0181] The present application is described with reference to the flowcharts and / or block diagrams of the methods, systems and computer program products according to the embodiments of the present application. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0182] In a typical configuration, the device includes one or more processors (CPU), memory and bus. The device may also include input / output interface, network interface and the like.
[0183] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip. The memory is an example of a computer-readable medium.
[0184] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0185] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0186] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. It should also be noted that the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0187] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0188] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.
Claims
1. A cloud-edge collaborative PID parameter determination method, characterized in that: Applied to an edge controller, the method comprises: Obtaining a controlled object model constructed by the cloud based on input-output data of the controlled object at multiple historical moments; wherein the controlled object model reflects the corresponding relationship between the input data and the output data of the controlled object; With the goal of minimizing the difference between the output data of the controlled object at a current moment and the output data of the controlled object model at a previous moment, the controlled object model is updated to obtain an updated model; An excitation signal is input into the updated model, a signal amplitude of a response signal output by the updated model is obtained, and a PID parameter is determined based on the signal amplitude of the excitation signal and the signal amplitude of the response signal.
2. The PID parameter determination method for cloud-edge collaboration according to claim 1 is characterized in that: The method for constructing the controlled object model comprises: Performing clustering processing on the input data at multiple historical moments to obtain multiple types of first data features; Dividing the input-output data at each historical moment according to the first data feature to obtain a plurality of divided data sets; the number of the divided data sets is the same as the total number of types of the first data feature; The model parameters of the fuzzy cognitive map model are trained using the divided data set to obtain the controlled object model; the fuzzy cognitive map model includes multiple first input nodes and an output node, the first input nodes represent the divided data set, the output nodes represent the output of the controlled object, and the model parameters represent the relationship between the nodes.
3. The PID parameter determination method for cloud-edge collaboration according to claim 2 is characterized in that: After obtaining the plurality of divided data sets, the method further includes: Performing clustering processing on the input data in the divided data set to obtain multiple types of second data features; Dividing the input-output data of the data set according to the second data feature to obtain a plurality of secondary divided data sets; the number of the secondary divided data sets is the same as the total number of types of the second data feature; The method of using the divided data set to train the model parameters of the fuzzy cognitive map model to obtain the controlled object model includes: The model parameters of the fuzzy cognitive map model are trained using the data set after the secondary division to obtain the controlled object model.
4. The PID parameter determination method for cloud-edge collaboration according to claim 3 is characterized in that: The method of using the data set after the secondary division to train the model parameters of the fuzzy cognitive map model to obtain the controlled object model includes: Constructing a plurality of fuzzy cognitive map sub-models; wherein the number of the fuzzy cognitive map sub-models is the same as the number of the divided data sets; the fuzzy cognitive map sub-models comprises a plurality of second input nodes and one output node, wherein the second input node represents the data set after the secondary division; Using the data set after the secondary division to train the model parameters of the fuzzy cognitive map sub-model, to obtain a plurality of controlled object sub-models; Performing weighted fusion on the model parameters of the plurality of controlled object sub-models to obtain fused model parameters; The controlled object model is generated based on the fused model parameters, a plurality of the second input nodes and one output node.
5. The PID parameter determination method for cloud-edge collaboration according to claim 4 is characterized in that: The step of performing weighted fusion on the model parameters of the plurality of sub-models of the controlled object to obtain fused model parameters includes: Determining the membership of the input data of the controlled object at a historical moment to each of the divided data sets; Compare the multiple memberships to obtain the maximum membership, and use the maximum membership as a weight; The weight is used as a weighted coefficient of the model parameter of the sub-model of the controlled object, and a weighted fusion method is adopted to obtain the fused model parameter.
6. The PID parameter determination method for cloud-edge collaboration according to claim 2 is characterized in that: The clustering process is performed on the input data at multiple historical moments to obtain multiple types of first data features, including: Performing fuzzy C-means clustering on the input data of multiple historical moments to obtain a membership matrix; the rows of the membership matrix represent a type of first data feature, the number of rows of the membership matrix is the same as the number of types of the first data feature, and the number of columns of the membership matrix is the same as the total number of the historical moments; The input-output data at each historical moment is divided according to the first data feature to obtain a plurality of divided data sets, including: For the input-output data at each historical moment, the maximum value is found from the corresponding column in the membership matrix, the type of the first data feature corresponding to the maximum value is used as the type of the input-output data at the historical moment, and the input-output data of the same type are aggregated into one data set to obtain multiple divided data sets.
7. The PID parameter determination method for cloud-edge collaboration according to claim 1 is characterized in that: The method of updating the controlled object model with the goal of minimizing the difference between the output data of the controlled object at the current moment and the output data of the controlled object model at the previous moment to obtain an updated model includes: With the goal of minimizing the difference between the output data of the controlled object at the current moment and the output data of the controlled object model at the previous moment, a gradient method is used to obtain incremental data of the model parameters of the controlled object model; Updating model parameters of the controlled object model based on the incremental data to obtain updated model parameters; The updated model parameters are used as model parameters of the controlled object model to obtain an updated model.
8. A cloud-edge collaborative PID parameter determination system, characterized in that: Applied to an edge controller, the system comprises: A controlled object model acquisition module, used to obtain a controlled object model constructed by the cloud based on input-output data of the controlled object at multiple historical moments; wherein the controlled object model reflects the corresponding relationship between the input data and the output data of the controlled object; A model updating module, configured to update the controlled object model with the goal of minimizing the difference between the output data of the controlled object at a current moment and the output data of the controlled object model at a previous moment, thereby obtaining an updated model; The PID parameter determination module is used to input the excitation signal into the updated model, obtain the signal amplitude of the response signal output by the updated model, and determine the PID parameters based on the signal amplitude of the excitation signal and the signal amplitude of the response signal.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a program, and when the program is executed by the processor, the cloud-edge collaborative PID parameter determination method described in any one of claims 1-7 is implemented.
10. An electronic device, characterized in that: include: At least one processor, and at least one memory and bus connected to the processor; The processor and the memory communicate with each other via the bus; The processor is used to call the program instructions in the memory to execute the cloud-edge collaborative PID parameter determination method described in any one of claims 1-7.
