PID (Proportion Integration Differentiation) setting method and device of control system and computer readable storage medium
By constructing a time series model and convex optimization function, solving and weighting the fusion PID parameters, the problem of insufficient accuracy of PID parameter tuning in the existing technology is solved, and efficient control performance is achieved in nonlinear timely denaturation scenarios.
Patent Information
- Application Number
- CN202411040478.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-31
- Publication Date
- 2024-12-27
AI Technical Summary
In the prior art, it is difficult to accurately tune PID parameters, especially in application scenarios with a large number of nonlinearity and time-varying, resulting in poor control effects.
By collecting input data and output data from the control system, a time series model is constructed, based on the predicted output data and discrete PID formula, the convex optimization function is determined, the optimal value of the PID parameter group is solved, and the optimal PID parameter group is obtained through weighted fusion. Until preset control performance requirements are met.
It realizes accurate calibration of PID parameters, avoids dependent on experience, improves the control performance and stability of the control system, and is especially suitable for nonlinear timely denaturation application scenarios.
Smart Images

Figure CN119200381A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of control, and in particular to a PID tuning method, device, computer equipment and computer-readable storage medium for a control system. Background Art
[0002] PID control is a common feedback control method, and has the advantages of being simple and stable. Therefore, it is widely used in industrial control, robot control, and automation fields.
[0003] However, the control effect of PID control is highly dependent on the selection of parameters. PID parameter tuning often relies on manual experience. However, in application scenarios with a large number of nonlinearities and time-varying properties, even experienced engineers find it difficult to accurately tune PID parameters. Therefore, there is no method to accurately tune PID parameters. Summary of the invention
[0004] The embodiments of the present application provide a PID tuning method, device and computer-readable storage medium for a control system, so as to at least solve the problem in the related art that it is difficult to accurately tune the PID parameters.
[0005] In a first aspect, an embodiment of the present application provides a PID tuning method for a control system, comprising:
[0006] Collecting input data and original output data in the control system, building a time series model according to the input data and the original output data, and obtaining predicted output data based on the time series model;
[0007] Based on the predicted output data, the preset output threshold and the discrete PID formula, a discrete PID function about the PID parameters is determined, and a convex optimization function is obtained according to the discrete PID function and the time series model;
[0008] Determining an optimal value of a PID parameter group based on the convex optimization function, and obtaining optimized output data of the control system based on the optimal value;
[0009] Acquire a performance evaluation value according to the optimized output data and the preset output threshold, and judge whether the control performance of the control system meets the preset requirements according to the performance evaluation value;
[0010] If the judgment is satisfied, the PID parameter group is used as the PID tuning parameters.
[0011] In one embodiment, the PID parameter group includes a proportional parameter, an integral parameter, and a differential parameter, and determining the optimal value of the PID parameter group based on the convex optimization function includes:
[0012] Partial derivatives are calculated for the PID parameter groups in the convex optimization function to obtain partial derivative arrays for the proportional parameter, integral parameter, and differential parameter;
[0013] Assigning values to the partial derivative array according to the convex optimization principle to obtain the optimized value of the PID parameter group;
[0014] The optimized value and the value of the original PID parameter group are weightedly fused to determine the optimal value of the PID parameter group.
[0015] In one embodiment, the optimized value and the value of the original PID parameter group are weightedly fused to determine that the optimal value of the PID parameter group satisfies the following formula:
[0016]
[0017] Among them, λ is the weight factor,
[0018] K p , K′ p , is the scale parameter,
[0019] K i , K′ i , is the integration parameter,
[0020] K d , K′ d , is the differential parameter,
[0021] K p , K i , K d is the optimized value of the PID parameter group,
[0022] K′ p , K′ i , K′ d is the value of the preset PID parameter,
[0023] is the optimal value of the PID parameter group.
[0024] In one embodiment, the step of obtaining a performance evaluation value according to the optimized output data and the preset output threshold, and judging whether the control performance of the control system meets the preset requirements according to the performance evaluation value, further includes:
[0025] If the judgment is not satisfied, the PID parameter group is continuously updated iteratively until the preset requirements are met, and the PID parameter group is used as the PID tuning parameters.
[0026] In one embodiment, the collecting of input data and original output data in the control system, and constructing a time series model based on the input data and original output data, includes:
[0027] Determine the time window according to the time it takes for the output of the control system to enter a stable state;
[0028] In the time window, input data and original output data of the control system are collected, and a time series model is constructed according to the input data and original output data.
[0029] In one embodiment, obtaining a performance evaluation value according to the optimized output data and the preset output threshold, and judging whether the control performance of the control system meets the preset requirements according to the performance evaluation value, includes:
[0030] Obtaining a group of square deviations between the optimized output data and the preset output threshold;
[0031] According to the integration of the square deviation group, taking the integration result as the performance evaluation value;
[0032] If the performance evaluation value is greater than a preset threshold, the preset requirement is not met;
[0033] If the performance evaluation value is less than the threshold, the preset requirement is met.
[0034] In one embodiment, obtaining a group of square deviations between the optimized output data and the preset output threshold includes:
[0035] Determine the time window according to the time it takes for the output of the control system to enter a stable state;
[0036] In the time window, the optimized output data and the preset output threshold of the control system are collected, and a square group of deviations between the optimized output data and the preset output threshold is obtained.
[0037] In a second aspect, an embodiment of the present application provides a PID tuning device for a control system, comprising:
[0038] A first acquisition module is used to collect input data and original output data in the control system, build a time series model according to the input data and the original output data, and obtain predicted output data based on the time series model;
[0039] A second acquisition module is used to determine a discrete PID function about PID parameters based on the predicted output data, a preset output threshold and a discrete PID formula, and obtain a convex optimization function according to the discrete PID function and the time series model;
[0040] A third acquisition module is used to determine the optimal value of the PID parameter group based on the convex optimization function, and obtain the optimized output data of the control system based on the optimal value;
[0041] A judgment module, used to obtain a performance evaluation value according to the optimized output data and the preset output threshold, and judge whether the control performance of the control system meets the preset requirements according to the performance evaluation value;
[0042] The determination module is used to use the PID parameter group as the PID tuning parameter if the judgment is satisfied.
[0043] In a third aspect, an embodiment of the present application provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the PID tuning method of the control system as described in the first aspect above is implemented.
[0044] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the PID tuning method for the control system as described in the first aspect above.
[0045] The PID tuning method for the control system provided in the embodiment of the present application has at least the following technical effects.
[0046] A time series model is constructed by collecting input data and output data in the control system, and based on the time series model, the predicted output data is obtained. Based on the predicted output data, the preset output threshold and the discrete PID formula, the discrete PID function about the PID parameters is determined, and the convex optimization function is obtained according to the discrete PID function and the time series model. The optimal value of the PID parameter group is determined based on the convex optimization function, and the optimized output data of the control system based on the optimal value is obtained. The performance evaluation value is obtained according to the optimized data and the preset output threshold. If the performance evaluation value meets the preset requirements, the PID parameter group is used as the PID tuning parameter. This avoids the PID parameter tuning based on experience and realizes the accurate tuning of the PID parameters.
[0047] Details of one or more embodiments of the present application are set forth in the following drawings and description to make other features, objects, and advantages of the present application more readily apparent. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0049] Figure 1is a flow chart of a PID tuning method for a control system according to an exemplary embodiment;
[0050] Figure 2 is a block diagram of a PID tuning device for a control system according to an exemplary embodiment;
[0051] Figure 3 is a block diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION
[0052] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application is described and illustrated below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. Based on the embodiments provided in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application.
[0053] Obviously, the drawings described below are only some examples or embodiments of the present application. For ordinary technicians in this field, the present application can also be applied to other similar scenarios based on these drawings without creative work. In addition, it can also be understood that although the efforts made in this development process may be complicated and lengthy, for ordinary technicians in this field related to the content disclosed in this application, some changes in design, manufacturing or production based on the technical content disclosed in this application are just conventional technical means, and should not be understood as insufficient content disclosed in this application.
[0054] Reference to "embodiments" in this application means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those of ordinary skill in the art that the embodiments described in this application may be combined with other embodiments without conflict.
[0055] Unless otherwise defined, the technical terms or scientific terms involved in this application should be understood by people with ordinary skills in the technical field to which this application belongs. The words "one", "a", "a", "the" and the like involved in this application do not indicate a quantitative limitation, and may represent the singular or plural. The terms "include", "comprise", "have" and any of their variations involved in this application are intended to cover non-exclusive inclusions; for example, a process, method, system, product or device that includes a series of steps or modules (units) is not limited to the listed steps or units, but may also include steps or units that are not listed, or may also include other steps or units inherent to these processes, methods, products or devices. The words "connect", "connected", "coupled" and the like involved in this application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The "multiple" involved in this application refers to two or more. "And / or" describes the association relationship of associated objects, indicating that there may be three relationships, for example, "A and / or B" can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the objects before and after are in an "or" relationship. The terms "first", "second", "third", etc. involved in this application are only used to distinguish similar objects and do not represent a specific ordering of the objects.
[0056] PID control is a common control feedback method, which is applied to the control of various parameters in industrial processes. A control system usually includes a PID controller and a controlled object. The PID controller takes the deviation between the actual output of the control system and the set output as input, forms the control quantity through a linear combination of proportion, integration and differentiation, and then controls the controlled object in the control system based on the control quantity, so that the actual output of the control system is consistent with the set output. However, the performance of the PID controller depends on the PID parameters, among which the PID parameters include proportional parameters, integral parameters and differential parameters. The proportional parameters are used to reduce the deviation, the integral parameters are used to eliminate the static error, and the differential parameters are used to reduce the overshoot of the system and overcome the oscillation, so as to improve the stability of the system. Therefore, as long as the proportional parameters, integral parameters and differential parameters can be accurately adjusted according to the control system, the system can be adjusted quickly, and the deviation can be eliminated to obtain the expected control effect.
[0057] Based on the above situation, the embodiments of the present application provide a PID tuning method, device and computer-readable storage medium for a control system.
[0058] In a first aspect, an embodiment of the present application provides a PID tuning method for a control system. Figure 1 is a flow chart of a PID tuning method for a control system according to an exemplary embodiment. Figure 1As shown in the figure, the PID tuning method of the control system includes:
[0059] Step S101: collect input data and original output data in the control system, build a time series model according to the input data and the original output data, and obtain predicted output data based on the time series model.
[0060] In one example, building a time series model specifically includes:
[0061] Determine the time window according to the time it takes for the output of the control system to enter a stable state;
[0062] In the time window, the input data and original output data of the control system are collected, and a time series model is constructed based on the input data and the original output data.
[0063] A large inertia system is a system with system resistance or energy storage elements in the control system. When the input of the control system enters the control system, the output of the control system will be output immediately, but the output does not meet the preset output requirements. It will take some time for the output of the control system to meet the preset output requirements.
[0064] A large time-delay system is a system in which the controlled object in the control system requires a period of time to execute and react. Therefore, when the input of the control system enters the control system, the output of the control system will not be output immediately, but will wait for a period of time before the control system outputs.
[0065] If the control system is a large inertia system or a large time-delay system, the output time of the control system is long and it also takes a long time for the output to enter a stable state. Therefore, a longer time window is selected so that the time window can cover the changes of the system; if the control system takes a shorter time to enter a stable state, a shorter time window is selected to save computing resources.
[0066] In this time window, the input data and original output data of the control system are obtained to build a time series model. The time series model adopts the CARIMA model and satisfies the following formula:
[0067] y(k)+a1y(k-1)+......+a n y(kn)=b1u(k-1)+......+b n y(kn)+ξ
[0068] Among them, a i , b i are model parameters, y(k) is the output data, u(k-1) is the input data, and ξ is the disturbance of the control system.
[0069] The input data and original output data of the control system are combined with the CARIMA model to determine the specific values of the model parameters, so that a time series model of the control system can be constructed. Based on the time series model, the output data of the control system is predicted to obtain the predicted output data.
[0070] By controlling the control system and the original output data, a time series model of the control system is constructed, and predicted output data is obtained, so that the subsequent PID parameter tuning is targeted and the accuracy of PID parameter tuning is improved.
[0071] Step S102: Based on the predicted output data, the preset output threshold and the discrete PID formula, a discrete PID function about the PID parameters is determined, and a convex optimization function is obtained according to the discrete PID function and the time series model.
[0072] The discrete PID formula satisfies:
[0073]
[0074] Among them, e(k) is the deviation between the actual output of the control system and the preset output. And, the actual output is y(k), and the preset output is r(k). Therefore, the discrete PID formula also satisfies the following formula:
[0075]
[0076] Among them, K p , K i , K d is the PID parameter to be adjusted, K p is the scale parameter, K i is the integration parameter, K d is the differential parameter. Therefore, we can obtain:
[0077] Based on the predicted output data, the preset output threshold and the discrete PID formula, a discrete PID function with respect to the PID parameters can be determined. The discrete PID function satisfies the following formula:
[0078] u(k)=a′1y(k)+a′2y(k-1)+.....+a′ N (y(kN))+c′0r(k)+......+c′ N (kN)
[0079] Among them, a′1, a′2,..., a′ N About K p , K i , K d That is, a′1=f1(K p , Ki , K d ), a′2=f2(K p K i ,K d ), ..., a′ N =f N (K p ,K i ,K d ).
[0080] According to the discrete PID function and the time series model, a convex optimization function is obtained. Among them, the convex optimization function satisfies:
[0081]
[0082] The discrete PID function of the control system is determined by the predicted output data of the control system, the preset output threshold and the discrete PID formula, and then the convex optimization function is obtained by combining the time series model, thereby simplifying the control problem of the control system.
[0083] Based on the predicted output data, preset output threshold and discrete PID formula, the discrete PID function about PID parameters is determined according to the discrete PID function and time series model.
[0084] Step S103: determine the optimal value of the PID parameter group based on the convex optimization function, and obtain optimized output data of the control system based on the optimal value.
[0085] Partial derivatives are calculated for the PID parameter group in the convex optimization function, that is, the K in the convex optimization function is calculated. p , K i , K d Find partial derivatives and obtain an array of partial derivatives with respect to proportional, integral, and differential parameters.
[0086] In a convex optimization problem, the local optimal solution of the convex optimization problem is the global optimal solution, that is, in a convex optimization problem, find a point where the objective function value continues to decrease until the stop condition is triggered or a minimum value is reached. Therefore, for a convex optimization function, it is a continuous and differentiable function. Therefore, for a convex optimization function, K p , K i , K d Calculate the partial derivatives respectively, obtain their partial derivative arrays, and assign the partial derivative arrays to 0, so as to obtain the optimized value of the PID parameter group.
[0087] The optimized value and the value of the original PID parameter group are weighted and fused to determine the optimal value of the PID parameter group.
[0088] Among them, the optimized value and the value of the original PID parameter group are weighted and fused to meet the following formula:
[0089]
[0090] Among them, λ is the weight factor, and its specific value is preset by the engineer based on experience and the operation target of the control system.
[0091] K p , K′ p , is the scale parameter,
[0092] K i , K′ i , is the integration parameter,
[0093] K d , K′ d , is the differential parameter,
[0094] K p , K i , K d is the optimized value of the PID parameter group,
[0095] K′ p , K′ i , K′ d is the value of the preset PID parameter,
[0096] is the optimal value of the PID parameter group.
[0097] The optimized value is weightedly fused with the value of the original PID parameter group, which improves the accuracy of PID parameter tuning and enables the control system to obtain the best control effect according to the optimal value.
[0098] Step S104: obtaining a performance evaluation value according to the optimized output data and a preset output threshold, and judging whether the control performance of the control system meets the preset requirements according to the performance evaluation value.
[0099] Based on the time window determined by the length of time that the output of the control system enters a stable state, in the time window, the optimized output data and the preset output threshold of the control system are collected, and the index function is constructed according to the square of the deviation between the output data and the preset output data, that is, by obtaining the square deviation group of the optimized output data and the preset output threshold. The obtained square deviation group is integrated to construct the index function, thereby obtaining the performance evaluation value. If the performance evaluation value is greater than the preset threshold, the preset requirement is not met; if the performance evaluation value is less than the threshold, the preset requirement is met.
[0100] The performance evaluation value is used to determine whether the control performance of the control system meets the preset requirements and whether the control system needs to iteratively update the PID parameter group.
[0101] Step S105: If the condition is satisfied, the PID parameter group is used as the PID tuning parameter.
[0102] If the performance evaluation value is less than the threshold, it is judged that the preset requirements of the control system are met, so that the PID parameter group is used as the PID tuning parameter, so that the control system, especially the nonlinear and time-varying system, can realize the adaptive adjustment of the PID parameters, so that the output can meet the target requirements and can be stable.
[0103] In summary, the PID tuning method of the control system provided in the embodiment of the present application constructs a time series model through the input data and output data of the control system, obtains a convex optimization function through the time series model, finds partial derivatives of the PID parameters of the convex optimization function, and sets its partial derivative to 0, thereby obtaining the optimized value of the PID parameter group. The optimized value and the value of the original PID parameter group are weighted and fused to obtain the optimal value of the PID parameter group. The control system obtains optimized output data based on the optimal value, obtains a performance evaluation value based on the optimized output data and the preset output data, and if the performance evaluation value meets the preset requirements, the PID parameter group is used as the PID tuning parameter, thereby achieving accurate tuning of the PID parameters.
[0104] In a second aspect, an embodiment of the present application provides a PID tuning device for a control system. Figure 2 is a block diagram of a PID tuning device for a control system according to an exemplary embodiment. Figure 2 As shown, the PID tuning device of the control system includes:
[0105] A first acquisition module is used to collect input data and original output data in the control system, build a time series model according to the input data and the original output data, and obtain predicted output data based on the time series model;
[0106] A second acquisition module is used to determine a discrete PID function about PID parameters based on the predicted output data, a preset output threshold and a discrete PID formula, and obtain a convex optimization function according to the discrete PID function and the time series model;
[0107] A third acquisition module is used to determine the optimal value of the PID parameter group based on the convex optimization function, and obtain the optimized output data of the control system based on the optimal value;
[0108] A judgment module, used to obtain a performance evaluation value according to the optimized output data and the preset output threshold, and judge whether the control performance of the control system meets the preset requirements according to the performance evaluation value;
[0109] The determination module is used to use the PID parameter group as the PID tuning parameter if the judgment is satisfied.
[0110] In summary, the PID tuning device of the control system provided by the present application, in the first acquisition module, constructs a time series model by collecting input data and output data in the control system, and obtains predicted output data based on the time series model. In the second acquisition module, the discrete PID function about the PID parameters is determined based on the predicted output data, the preset output threshold and the discrete PID formula, and the convex optimization function is obtained according to the discrete PID function and the time series model. In the third acquisition module, the optimal value of the PID parameter group is determined based on the convex optimization function, and the optimized output data of the control system based on the optimal value is obtained. In the judgment module, the performance evaluation value is obtained according to the optimization data and the preset output threshold. In the determination module, if the performance evaluation value meets the preset requirements, the PID parameter group is used as the PID tuning parameter. Thereby avoiding the PID parameter tuning based on experience and realizing the accurate tuning of the PID parameters.
[0111] It should be noted that the PID tuning device for the control system provided in this embodiment is used to implement the above-mentioned implementation mode, and the descriptions that have been made will not be repeated. As used above, the terms "module", "unit", "subunit" and the like can implement a combination of software and / or hardware for a predetermined function. Although the device described in the above embodiment is preferably implemented in software, the implementation in hardware, or a combination of software and hardware is also possible and conceivable.
[0112] In a third aspect, an embodiment of the present application provides an electronic device, Figure 3 FIG. 1 is a block diagram of an electronic device according to an exemplary embodiment. Figure 3 As shown, the electronic device may include a processor 81 and a memory 82 storing computer program instructions.
[0113] Specifically, the processor 81 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.
[0114] Among them, the memory 82 may include a large-capacity memory for data or instructions. By way of example and not limitation, the memory 82 may include a hard disk drive (HDD), a floppy disk drive, a solid-state drive (SSD), a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive, or a combination of two or more of these. Where appropriate, the memory 82 may include a removable or non-removable (or fixed) medium. Where appropriate, the memory 82 may be inside or outside the data processing device. In a specific embodiment, the memory 82 is a non-volatile memory. In a specific embodiment, the memory 82 includes a read-only memory (ROM) and a random access memory (RAM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable ROM (Programmable Read-Only Memory, PROM for short), an erasable PROM (ErasableProgrammable Read-Only Memory, EPROM for short), an electrically erasable PROM (Electrically ErasableProgrammable Read-Only Memory, EEPROM for short), an electrically alterable ROM (ElectricallyAlterableRead-Only Memory, EAROM for short) or a flash memory (FLASH) or a combination of two or more of these. Under appropriate circumstances, the RAM can be a static random access memory (SRAM) or a dynamic random access memory (DRAM), wherein the DRAM can be a fast page mode dynamic random access memory (FPMDRAM), an extended data output dynamic random access memory (EDODRAM), a synchronous dynamic random access memory (SDRAM), etc.
[0115] The memory 82 may be used to store or cache various data files required for processing and / or communication, as well as possible computer program instructions executed by the processor 81 .
[0116] The processor 81 implements any one of the PID tuning methods for the control system in the above embodiments by reading and executing computer program instructions stored in the memory 82 .
[0117] In one embodiment, the PID tuning device of the control system may further include a communication interface 83 and a bus 80. Figure 3 As shown, the processor 81, the memory 82, and the communication interface 83 are connected via a bus 80 and communicate with each other.
[0118] The communication interface 83 is used to implement communication between the modules, devices, units and / or equipment in the embodiment of the present application. The communication port 83 can also implement data communication with other components such as: external devices, image / data acquisition equipment, databases, external storage, and image / data processing workstations.
[0119] The bus 80 includes hardware, software or both, and couples the components of the PID tuning device of the control system to each other. The bus 80 includes but is not limited to at least one of the following: a data bus, an address bus, a control bus, an expansion bus, and a local bus. By way of example and not limitation, bus 80 may include an Accelerated Graphics Port (AGP) or other graphics bus, an Extended Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a HyperTransport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an InfiniBand interconnect, a Low Pin Count (LPC) bus, a memory bus, a MicroChannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local Bus (VLB) bus, or other suitable buses or a combination of two or more of these. Where appropriate, bus 80 may include one or more buses. Although embodiments of the present application describe and illustrate a particular bus, the present application contemplates any suitable bus or interconnect.
[0120] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a program stored thereon, and when the program is executed by a processor, the PID tuning method of the control system provided in the first aspect is implemented.
[0121] The readable storage medium may include but is not limited to: a portable disk, a hard disk, a random access memory, a read-only memory, an erasable programmable read-only memory, an optical storage device, a magnetic storage device or any suitable combination of the above.
[0122] In a possible implementation, the present invention can also be implemented in the form of a program product, which includes a program code. When the program product is run on a terminal device, the program code is used to enable the terminal device to execute the steps of the PID tuning method for the control system provided in the first aspect.
[0123] The program code for executing the present invention may be written in any combination of one or more programming languages, and may be executed entirely on a user device, partially on a user device, as an independent software package, partially on a user device and partially on a remote device, or entirely on a remote device.
[0124] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0125] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. A PID tuning method for a control system, characterized in that: include: Collecting input data and original output data in the control system, building a time series model according to the input data and the original output data, and obtaining predicted output data based on the time series model; Based on the predicted output data, the preset output threshold and the discrete PID formula, a discrete PID function about the PID parameters is determined, and a convex optimization function is obtained according to the discrete PID function and the time series model; Determining an optimal value of a PID parameter group based on the convex optimization function, and obtaining optimized output data of the control system based on the optimal value; Acquire a performance evaluation value according to the optimized output data and the preset output threshold, and judge whether the control performance of the control system meets the preset requirements according to the performance evaluation value; If the judgment is satisfied, the PID parameter group is used as the PID tuning parameters.
2. The PID tuning method of the control system according to claim 1, characterized in that: The PID parameter group includes a proportional parameter, an integral parameter and a differential parameter, and determining the optimal value of the PID parameter group based on the convex optimization function includes: Partial derivatives are calculated for the PID parameter groups in the convex optimization function to obtain partial derivative arrays for the proportional parameter, integral parameter, and differential parameter; Assigning values to the partial derivative array according to the convex optimization principle to obtain an optimized value of the PID parameter group; The optimized value and the value of the original PID parameter group are weightedly fused to determine the optimal value of the PID parameter group.
3. The PID tuning method of the control system according to claim 2, characterized in that: The optimized value and the value of the original PID parameter group are weightedly integrated to determine that the optimal value of the PID parameter group satisfies the following formula: Among them, λ is the weight factor, K p , K′ p , is the scale parameter, K i , K′ i , is the integration parameter, K d , K′ d , is the differential parameter, K p , K i , K d is the optimized value of the PID parameter group, K′ p , K′ i , K′ d is the value of the preset PID parameter, is the optimal value of the PID parameter group.
4. The PID tuning method of the control system according to claim 1, characterized in that: The step of obtaining a performance evaluation value according to the optimized output data and the preset output threshold, and judging whether the control performance of the control system meets the preset requirements according to the performance evaluation value, further includes: If the judgment is not satisfied, the PID parameter group is continuously updated iteratively until the preset requirements are met, and the PID parameter group is used as the PID tuning parameters.
5. The PID tuning method of the control system according to claim 1, characterized in that: The collecting of input data and original output data in the control system, and building a time series model based on the input data and original output data, include: Determine the time window according to the time it takes for the output of the control system to enter a stable state; In the time window, input data and original output data of the control system are collected, and a time series model is constructed according to the input data and original output data.
6. The PID tuning method of the control system according to claim 1, characterized in that: The obtaining of a performance evaluation value according to the optimized output data and the preset output threshold, and judging whether the control performance of the control system meets the preset requirements according to the performance evaluation value, comprises: Obtaining a group of square deviations between the optimized output data and the preset output threshold; Integrating the square deviation group and taking the integration result as the performance evaluation value; If the performance evaluation value is greater than a preset threshold, the preset requirement is not met; If the performance evaluation value is less than the threshold, the preset requirement is met.
7. The PID tuning method of the control system according to claim 6, characterized in that: The step of obtaining a group of square deviations between the optimized output data and the preset output threshold comprises: Determine the time window according to the time it takes for the output of the control system to enter a stable state; In the time window, the optimized output data and the preset output threshold of the control system are collected, and a square group of deviations between the optimized output data and the preset output threshold is obtained.
8. A PID tuning device for a control system, characterized in that: include: A first acquisition module is used to collect input data and original output data in the control system, build a time series model according to the input data and the original output data, and obtain predicted output data based on the time series model; A second acquisition module is used to determine a discrete PID function about PID parameters based on the predicted output data, a preset output threshold and a discrete PID formula, and obtain a convex optimization function according to the discrete PID function and the time series model; A third acquisition module is used to determine the optimal value of the PID parameter group based on the convex optimization function, and obtain the optimized output data of the control system based on the optimal value; A judgment module, used to obtain a performance evaluation value according to the optimized output data and the preset output threshold, and judge whether the control performance of the control system meets the preset requirements according to the performance evaluation value; The determination module is used to use the PID parameter group as the PID tuning parameter if the judgment is satisfied.
9. An electronic device, characterized in that: The system comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the PID tuning method of the control system as claimed in any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the PID tuning method of the control system according to any one of claims 1 to 7 is implemented.
