Joint simulation method and device for PID (Proportion Integration Differentiation) control

By using joint simulation method and differential evolution algorithm in PID control to optimize the PID controller parameters, the problems of local optimality and initial value sensitivity in traditional methods are solved, and the simulation effect is improved.

CN119717489AActive Publication Date: 2025-03-28SHENZHEN SHIGUAN DIGITAL INTELLIGENCE TECH CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202411891656.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-20
Publication Date
2025-03-28
Estimated Expiration
2044-12-20

AI Technical Summary

Technical Problem

Traditional PID control parameter optimization methods are prone to falling into local optimization or being sensitive to initial values, resulting in poor simulation results.

Method used

The joint simulation method is adopted, and the modeling platform GCKontrol is used to build a mathematical model of the control system. Combined with the Python programming environment Jupyter and the differential evolution algorithm, the parameters of the PID controller are selected to make the target performance function meet the predetermined index level, and the PID control joint simulation is performed through the Python API interface.

Benefits of technology

The simulation effect of PID control is improved, the problems of local optimal and initial value sensitivity are avoided, and the optimization of PID control parameters is achieved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119717489A_ABST
    Figure CN119717489A_ABST
Patent Text Reader

Abstract

The invention provides a joint simulation method and device for PID control, and relates to the technical field of PID control. When the method is executed, firstly, a modeling platform GCKontrol is utilized to construct a control system mathematical model of a controlled object, the control system mathematical model of the controlled object comprises a PID controller, then, in a Python programming environment Juser, a differential evolution algorithm is utilized to select parameters of the PID controller, so that a target performance function meets a preset index level, and finally, the control system mathematical model of the controlled object comprises the PID controller. PID control joint simulation is carried out on the mathematical model of the control system of the controlled object through a Python API interface and a GCKontrol. Therefore, the parameters of the PID controller are adjusted and optimized by using the differential evolution algorithm in the Juser, and PID control joint simulation is carried out by using the adjusted and optimized parameters, so that the simulation effect of PID control can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of PID control, and in particular to a joint simulation method and device for PID control. Background Art

[0002] PID control is the most widely used control algorithm in the industrial field. The parameters of the PID controller directly affect the control effect. Therefore, the optimization of PID control parameters has become a focus of attention in the industry. Traditional parameter optimization methods, such as indirect optimization method, gradient method, simplex method, etc., are often prone to local optimal or sensitive to initial values, resulting in optimization failure, which in turn leads to poor simulation effect of PID control.

[0003] In summary, how to improve the simulation effect of PID control is a problem that technical personnel in this field need to solve urgently. Summary of the invention

[0004] In view of this, the present application provides a joint simulation method and device for PID control, aiming to improve the simulation effect of PID control.

[0005] In a first aspect, the present application provides a PID control joint simulation method, comprising:

[0006] The control system mathematical model of the controlled object is constructed by using the modeling platform GCKontrol; the control system mathematical model of the controlled object includes a PID controller;

[0007] In the Python programming environment Jupyter, the differential evolution algorithm is used to select the parameters of the PID controller so that the target performance function meets the predetermined indicator level;

[0008] Through the Python API interface and the GCKontrol, a PID control joint simulation is performed on the control system mathematical model of the controlled object.

[0009] Optionally, the parameters of the PID controller include a proportional parameter, an integral parameter and a differential parameter.

[0010] Optionally, in the Python programming environment Jupyter, using a differential evolution algorithm to select parameters of the PID controller so that the target performance function meets a predetermined indicator level includes:

[0011] In the Python programming environment Jupyter, respectively set value ranges for the proportional parameter, the integral parameter, and the differential parameter;

[0012] Randomly generate N individuals using a random function; N is a positive integer;

[0013] The N individuals are used to form a population; the individuals in the population are vectors composed of one of the proportion parameters, one of the integral parameters and one of the differential parameters;

[0014] Decoding individuals in the population into parameters corresponding to the individuals;

[0015] calculating a target performance function using the parameters;

[0016] Determining whether a preset condition is met; the preset condition is that the parameter converges or the target performance function meets the predetermined indicator level;

[0017] If so, the parameters are output.

[0018] Optionally, after determining whether the preset condition is met, the method further includes:

[0019] If not, the population is processed using a differential evolution algorithm to obtain the next generation population;

[0020] Decoding the individuals in the next generation population into parameters corresponding to the individuals;

[0021] calculating a target performance function using the parameters;

[0022] Determine whether the preset condition is met.

[0023] In a second aspect, the present application provides a PID control joint simulation device, comprising:

[0024] A construction module, used for constructing a control system mathematical model of a controlled object by using a modeling platform GCKontrol; the control system mathematical model of the controlled object includes a PID controller;

[0025] A selection module is used to select parameters of the PID controller using a differential evolution algorithm in the Python programming environment Jupyter so that the target performance function meets a predetermined indicator level;

[0026] The joint simulation module is used to perform PID control joint simulation on the control system mathematical model of the controlled object through the Python API interface and the GCKontrol.

[0027] Optionally, the parameters of the PID controller include a proportional parameter, an integral parameter and a differential parameter.

[0028] Optionally, the selection module includes:

[0029] A setting unit, used for setting value ranges for the proportional parameter, the integral parameter and the differential parameter respectively in the Python programming environment Jupyter;

[0030] A random generation unit, used to randomly generate N individuals using a random function; N is a positive integer;

[0031] A constituting unit, used to form a population using the N individuals; the individuals in the population are vectors consisting of one of the proportion parameters, one of the integral parameters and one of the differential parameters;

[0032] A first decoding unit, used for decoding individuals in the population into parameters corresponding to the individuals;

[0033] A first calculation unit, configured to calculate a target performance function using the parameters;

[0034] A first judgment unit, used to judge whether a preset condition is met; the preset condition is that the parameter converges or the target performance function meets the predetermined indicator level;

[0035] An output unit is used to output the parameter if yes.

[0036] Optionally, the device further comprises:

[0037] a processing unit, for, if not, processing the population using a differential evolution algorithm to obtain a next generation population;

[0038] A second decoding unit, used for decoding the individuals in the next generation population into parameters corresponding to the individuals;

[0039] a second calculation unit, configured to calculate a target performance function using the parameters;

[0040] The second judging unit is used to judge whether the preset condition is met.

[0041] 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, a joint simulation method of PID control as described in any one of the implementation modes in the first aspect of the embodiment of the present application is implemented.

[0042] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which instructions are stored. When the instructions are executed on a terminal device, the terminal device executes the joint simulation method of PID control as described in any one of the implementation methods in the first aspect of the embodiment of the present application.

[0043] The present application provides a joint simulation method for PID control. When executing the method, the mathematical model of the control system of the controlled object is first constructed using the modeling platform GCKontrol, wherein the mathematical model of the control system of the controlled object includes a PID controller, and then, in the Python programming environment Jupyter, the differential evolution algorithm is used to select the parameters of the PID controller so that the target performance function meets the predetermined index level, and finally, the mathematical model of the control system of the controlled object is subjected to PID control joint simulation through the Python API interface and GCKontrol. In this way, the parameters of the PID controller are tuned using the differential evolution algorithm in Jupyter, and the PID control joint simulation is performed using the tuned parameters, which can improve the simulation effect of PID control. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] In order to more clearly illustrate the technical solutions in this embodiment or 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 application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0045] Figure 1 A flowchart of a PID control joint simulation method provided in an embodiment of the present application;

[0046] Figure 2 A schematic diagram of a mathematical model of a control system of a controlled object provided in an embodiment of the present application;

[0047] Figure 3 A schematic diagram of parameter convergence provided in an embodiment of the present application;

[0048] Figure 4 A schematic diagram of the structure of a PID-controlled joint simulation device provided in an embodiment of the present application;

[0049] Figure 5 A schematic diagram of the structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0050] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. The present application provides a joint simulation method and device for PID control, which is used in the field of PID control technology. The above is only an example and does not limit the application field of the method and device name provided by the present application.

[0051] PID control is the most widely used control algorithm in the industrial field. The parameters of the PID controller directly affect the control effect. Therefore, the optimization of PID control parameters has become a focus of attention in the industry. Traditional parameter optimization methods, such as indirect optimization method, gradient method, simplex method, etc., are often prone to local optimal or sensitive to initial values, resulting in optimization failure, which in turn leads to poor simulation effect of PID control.

[0052] After research, the inventor proposed the technical solution of this application. First, the mathematical model of the control system of the controlled object is constructed using the modeling platform GCKontrol, wherein the mathematical model of the control system of the controlled object includes a PID controller. Then, in the Python programming environment Jupyter, the differential evolution algorithm is used to select the parameters of the PID controller so that the target performance function meets the predetermined index level. Finally, the PID control joint simulation is performed on the mathematical model of the control system of the controlled object through the Python API interface and GCKontrol. In this way, the differential evolution algorithm is used in Jupyter to tune the parameters of the PID controller, and the tuned parameters are used to perform PID control joint simulation, which can improve the simulation effect of PID control.

[0053] In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments 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. It should be noted that, for ease of description, only the parts related to the relevant invention are shown in the accompanying drawings. In the absence of conflict, the embodiments in the present application and the features in the embodiments can be combined with each other.

[0054] See also Figure 1 , Figure 1 A flowchart of a PID control joint simulation method provided in an embodiment of the present application includes:

[0055] S101: Use the modeling platform GCKontrol to construct the control system mathematical model of the controlled object.

[0056] The modeling platform GCKontrol is used to construct the mathematical model of the control system of the controlled object, such as Figure 2 As shown, Figure 2A schematic diagram of a mathematical model of a control system of a controlled object provided in an embodiment of the present application, the mathematical model of the control system of the controlled object is composed of an input-output module, a transfer function module, an integral module, a differential module, an addition-subtraction operation module, etc. The transfer function represents the model of the controlled object after Laplace transformation, the input module represents the command signal of the system, and the output module represents the output signal of the controlled object. The two are passed through the addition-subtraction operation module to obtain a tracking deviation to drive the controller output. The controller is composed of a standard PID controller in the form of a proportional, integral, and differential module. The proportional parameter is defined as K in the GCK data dictionary. p ; The integral parameter is defined in the GCK data dictionary as K i ; The differential parameter is defined in the GCK data dictionary as K d .

[0057] S102: In the Python programming environment Jupyter, the differential evolution algorithm is used to select parameters of the PID controller so that the target performance function meets the predetermined indicator level.

[0058] Differential Evolution (DE) is a random heuristic search algorithm that simulates the biological population in nature and follows the principle of "survival of the fittest". It has good robustness and powerful global search capabilities.

[0059] The differential evolution algorithm retains the global search strategy based on population, adopts real number coding, simple mutation operation based on difference and one-to-one competition survival strategy, and reduces the complexity of genetic operation. At the same time, the unique memory ability of the differential evolution algorithm enables it to dynamically track the current search situation to adjust its search strategy. It has strong global convergence ability and robustness, and does not require the characteristic information of the problem. It is suitable for solving some optimization problems in complex environments that cannot be solved by conventional mathematical programming methods. The differential evolution algorithm can realize trajectory planning.

[0060] The differential evolution algorithm performs mutation, crossover and selection operations based on the differential vectors between parent individuals. The basic idea is to start from a randomly generated initial population, generate new individuals by weighting the vector difference between any two individuals in the population and summing it with a third individual according to certain rules, and then compare the new individuals with a predetermined individual in the contemporary population. If the fitness value of the new individual is better than the fitness value of the individual compared with it, the new individual will replace the old individual in the next generation, otherwise the old individual will still be preserved. Through continuous iterative operations, excellent individuals are retained and inferior individuals are eliminated, guiding the search process to approach the optimal solution.

[0061] The parameters of the PID controller are selected so that the target performance function meets the predetermined index level, that is, the parameters of the PID controller are optimized so that the target performance function meets the predetermined index level. Specifically: by selecting a suitable proportional parameter K p , integration parameter K i And the differential parameter K d , so that the target performance function J reaches the optimal value, where J is an indicator function related to the control system response characteristics tracking deviation, overshoot, control input amplitude, etc.

[0062] In order to obtain satisfactory dynamic characteristics of the transition process, the time integral performance index of the absolute value of the tracking deviation is used as an important part of the index function. In order to prevent the control input from being too large, the square term of the control input is added to the objective function. At the same time, in order to minimize the overshoot, the overshoot is used as part of the index function to form a complete index function.

[0063] The final indicator function to be optimized is as follows:

[0064]

[0065] Among them, w 1 is the scale parameter K p ;w 2 is the integration parameter K i ;w 3 is the differential parameter K d ; e is the tracking deviation; t is the time; u is the control input.

[0066] Specifically, in the Python programming environment Jupyter, the specific steps of using the differential evolution algorithm to find the optimal indicator function and optimize the PID control parameters are as follows:

[0067] (1) is the proportional parameter K p , integration parameter K i And the differential parameter K d Set the approximate value range:

[0068] k p ∈[k pmin ,k pmax ]

[0069] k i ∈[k imin ,k imax ]

[0070] k d ∈[k dmin ,k dmax ].

[0072] (2) Use a random function to randomly generate N individuals, where N is a positive integer. Use the above N individuals to form a population, and the individuals in the population are determined by a proportion parameter K p , an integration parameter K i and a differential parameter K d The vector composed.

[0073] (3) Decode each individual in the population into corresponding parameter values, and use these parameter values ​​to calculate the cost function J.

[0074] (4) Use the differential evolution algorithm to process the population and generate the next generation of population.

[0075] (5) Repeat steps (3) and (4) until the parameters converge or the cost function J reaches a predetermined index level. Figure 3 As shown, Figure 3 A schematic diagram of parameter convergence provided in an embodiment of the present application.

[0076] S103: Through the Python API interface and GCKontrol, PID control joint simulation is performed on the control system mathematical model of the controlled object.

[0077] Use the Python API of GCKontrol to obtain the name of the currently running library and the required variable values. Here we take dexterity and maximum spatial range as the objective function to be optimized. The specific steps are as follows: first use GCKontrol to obtain the currently opened project, then set the simulation time, simulation step and sampling step, and then obtain the variable setting module. Then, initialize the population size and number of iterations and set the objective function. Next, call the API simulation cyclically, perform mutation operations, crossover operations and boundary condition processing, calculate the objective function and select parameters, and determine whether the termination conditions are met. If so, the selected parameters are output as the optimal PID parameter values; if not, jump to the step of cyclically calling the API simulation step or calculating the objective function.

[0078] In the embodiment provided in the present application, the mathematical model of the control system of the controlled object is first constructed using the modeling platform GCKontrol, wherein the mathematical model of the control system of the controlled object includes a PID controller, and then, in the Python programming environment Jupyter, the differential evolution algorithm is used to select the parameters of the PID controller so that the target performance function meets the predetermined index level, and finally, the PID control joint simulation is performed on the mathematical model of the control system of the controlled object through the Python API interface and GCKontrol. In this way, the differential evolution algorithm is used in Jupyter to tune the parameters of the PID controller, and the tuned parameters are used to perform PID control joint simulation, which can improve the simulation effect of PID control.

[0079] The above are some specific implementations of the PID control joint simulation method provided by the embodiment of the present application. Based on this, the present application also provides a corresponding device. The device provided by the embodiment of the present application will be introduced from the perspective of functional modularization.

[0080] See also Figure 4 , Figure 4 A schematic diagram of the structure of a PID-controlled joint simulation device provided in an embodiment of the present application, the PID-controlled joint simulation device 400 includes:

[0081] A construction module 410 is used to construct a control system mathematical model of a controlled object using a modeling platform GCKontrol; the control system mathematical model of the controlled object includes a PID controller;

[0082] A selection module 420 is used to select parameters of the PID controller using a differential evolution algorithm in the Python programming environment Jupyter so that the target performance function meets a predetermined indicator level;

[0083] The joint simulation module 430 is used to perform PID control joint simulation on the control system mathematical model of the controlled object through the Python API interface and the GCKontrol.

[0084] Optionally, the parameters of the PID controller include a proportional parameter, an integral parameter and a differential parameter.

[0085] Optionally, the selection module 420 includes:

[0086] A setting unit, used for setting value ranges for the proportional parameter, the integral parameter and the differential parameter respectively in the Python programming environment Jupyter;

[0087] A random generation unit, used to randomly generate N individuals using a random function; N is a positive integer;

[0088] A constituting unit, used to form a population using the N individuals; the individuals in the population are vectors consisting of one of the proportion parameters, one of the integral parameters and one of the differential parameters;

[0089] A first decoding unit, used for decoding individuals in the population into parameters corresponding to the individuals;

[0090] A first calculation unit, configured to calculate a target performance function using the parameters;

[0091] A first judgment unit, used to judge whether a preset condition is met; the preset condition is that the parameter converges or the target performance function meets the predetermined indicator level;

[0092] An output unit is used to output the parameter if yes.

[0093] Optionally, the device 400 further includes:

[0094] a processing unit, for, if not, processing the population using a differential evolution algorithm to obtain a next generation population;

[0095] A second decoding unit, used for decoding the individuals in the next generation population into parameters corresponding to the individuals;

[0096] a second calculation unit, configured to calculate a target performance function using the parameters;

[0097] The second judging unit is used to judge whether the preset condition is met.

[0098] The embodiments of the present application also provide corresponding devices and computer storage media for implementing the solutions provided by the embodiments of the present application.

[0099] like Figure 5 As shown, the computer device 01 is in the form of a general computing device. The components of the computer device 01 may include but are not limited to: one or more processors or processing units 03, a system memory 08, and a bus 04 connecting different system components (including the system memory 08 and the processing unit 03).

[0100] Bus 04 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor or a local bus using any of a variety of bus structures. For example, these architectures include but are not limited to Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MAC) bus, Enhanced ISA bus, Video Electronics Standards Association (VESA) local bus and Peripheral Component Interconnect (PCI) bus.

[0101] The computer device 01 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the computer device 01, including volatile and non-volatile media, removable and non-removable media.

[0102] The system memory 08 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 09 and / or cache memory 10. The computer device 01 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 11 may be used to read and write non-removable, non-volatile magnetic media ( Figure 5 not shown, usually called a "hard drive"). Although Figure 5 Not shown in the figure, a disk drive for reading and writing a removable non-volatile disk (e.g., a "floppy disk"), and an optical disk drive for reading and writing a removable non-volatile optical disk (e.g., a CD-ROM, a DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to the bus 04 via one or more data medium interfaces. The memory 08 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of the various embodiments of the present invention.

[0103] A program / utility 12 having a set (at least one) of program modules 13 may be stored, for example, in the memory 08, such program modules 13 including but not limited to an operating system, one or more application programs, other program modules, and program data, each of which or some combination thereof may include an implementation of a network environment. The program modules 13 generally perform the functions and / or methods of the embodiments described herein.

[0104] The computer device 01 may also communicate with one or more external devices 02 (e.g., keyboard, pointing device, display 07, etc.), one or more devices that enable a user to interact with the computer device 01, and / or any device that enables the computer device 01 to communicate with one or more other computing devices (e.g., network card, modem, etc.). Such communication may be performed via input / output (I / O) interface 06. Furthermore, the computer device 01 may also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN) and / or public network, such as the Internet) via network adapter 05. Figure 5 As shown, the network adapter 05 communicates with other modules of the computer device 01 via the bus 04. It should be understood that although Figure 5Not shown, other hardware and / or software modules may be used in conjunction with computer device 01, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0105] The processor unit 03 executes various functional applications and data processing by running the programs stored in the system memory 08, for example, implementing a PID control joint simulation method provided in an embodiment of the present application.

[0106] 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. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article 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, article 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, article or device including the elements.

[0107] Through the description of the above implementation methods, it can be known that those skilled in the art can clearly understand that all or part of the steps in the above-mentioned embodiment method can be implemented by means of software plus a general hardware platform. Based on such an understanding, the technical solution of the present application can be embodied in the form of a software product, which can be stored in a storage medium, such as a read-only memory (ROM) / RAM, a magnetic disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network communication device such as a router) to execute the methods described in each embodiment of the present application or some parts of the embodiments.

[0108] Each embodiment in this specification is described in a progressive manner, and the same and 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 device 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. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative work.

[0109] The above description is merely an exemplary embodiment of the present application and is not intended to limit the protection scope of the present application.

Claims

1. A joint simulation method for PID control, characterized in that: include: The control system mathematical model of the controlled object is constructed by using the modeling platform GCKontrol; the control system mathematical model of the controlled object includes a PID controller; In the Python programming environment Jupyter, the differential evolution algorithm is used to select the parameters of the PID controller so that the target performance function meets the predetermined indicator level; Through the Python API interface and the GCKontrol, a PID control joint simulation is performed on the control system mathematical model of the controlled object.

2. The method according to claim 1, characterized in that The parameters of the PID controller include a proportional parameter, an integral parameter and a differential parameter.

3. The method according to claim 2, characterized in that In the Python programming environment Jupyter, the differential evolution algorithm is used to select the parameters of the PID controller so that the target performance function meets the predetermined indicator level, including: In the Python programming environment Jupyter, respectively set value ranges for the proportional parameter, the integral parameter, and the differential parameter; Randomly generate N individuals using a random function; N is a positive integer; The N individuals are used to form a population; the individuals in the population are vectors composed of one of the proportion parameters, one of the integral parameters and one of the differential parameters; Decoding individuals in the population into parameters corresponding to the individuals; calculating a target performance function using the parameters; Determining whether a preset condition is met; the preset condition is that the parameter converges or the target performance function meets the predetermined indicator level; If so, the parameters are output.

4. The method according to claim 3, characterized in that After determining whether the preset condition is met, the method further includes: If not, the population is processed using a differential evolution algorithm to obtain the next generation population; Decoding the individuals in the next generation population into parameters corresponding to the individuals; calculating a target performance function using the parameters; Determine whether the preset condition is met.

5. A PID control joint simulation device, characterized in that: include: A construction module, used for constructing a control system mathematical model of a controlled object by using a modeling platform GCKontrol; the control system mathematical model of the controlled object includes a PID controller; A selection module is used to select parameters of the PID controller using a differential evolution algorithm in the Python programming environment Jupyter so that the target performance function meets a predetermined indicator level; The joint simulation module is used to perform PID control joint simulation on the control system mathematical model of the controlled object through the Python API interface and the GCKontrol.

6. The device according to claim 5, characterized in that The parameters of the PID controller include a proportional parameter, an integral parameter and a differential parameter.

7. The device according to claim 6, characterized in that The selection module comprises: A setting unit, used for setting value ranges for the proportional parameter, the integral parameter and the differential parameter respectively in the Python programming environment Jupyter; A random generation unit, used to randomly generate N individuals using a random function; N is a positive integer; A constituting unit, used to form a population using the N individuals; the individuals in the population are vectors consisting of one of the proportion parameters, one of the integral parameters and one of the differential parameters; A first decoding unit, used for decoding individuals in the population into parameters corresponding to the individuals; A first calculation unit, configured to calculate a target performance function using the parameters; A first judgment unit, used to judge whether a preset condition is met; the preset condition is that the parameter converges or the target performance function meets the predetermined indicator level; An output unit is used to output the parameter if yes.

8. The device according to claim 7, characterized in that The device also includes: a processing unit, for, if not, processing the population using a differential evolution algorithm to obtain a next generation population; A second decoding unit, used for decoding the individuals in the next generation population into parameters corresponding to the individuals; a second calculation unit, configured to calculate a target performance function using the parameters; The second judging unit is used to judge whether the preset condition is met.

9. A computer device, characterized in that: include: 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 combined simulation method for PID control as described in any one of claims 1 to 4 is implemented.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores instructions, and when the instructions are executed on a terminal device, the terminal device executes the joint simulation method for PID control as described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • A PID controller parameter optimal setting method based on a differential evolution method

    CN105700353A

  • Quad-rotor unmanned aerial vehicle PID controller parameter optimization method

    CN112016162A

  • Automatic modeling and simulation method and device

    CN114925516A

  • Method and system for optimizing small network mode control parameters of hydroelectric generating set and storage medium

    CN115680981A

  • Six-degree-of-freedom platform structure optimization method and device

    CN115935697A