A method and apparatus for joint simulation of PID control

By optimizing the PID controller parameters using the differential evolution algorithm in the Python environment, the problem of poor simulation results in traditional PID control methods is solved, and more efficient simulation results are achieved.

CN119717489BActive Publication Date: 2026-02-03SHENZHEN SHIGUAN DIGITAL INTELLIGENCE TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

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

Method used

A mathematical model of the control system was constructed using the modeling platform GCKontrol. The parameters of the PID controller were optimized in the Python programming environment Jupyter using the differential evolution algorithm to ensure that the target performance function meets the predetermined index level. Finally, the PID control was co-simulated using the Python API interface and GCKontrol.

Benefits of technology

The simulation effect of PID control was improved by optimizing the parameters of the PID controller through differential evolution algorithm, thereby improving the accuracy and efficiency of the simulation results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119717489B_ABST
    Figure CN119717489B_ABST
Patent Text Reader

Abstract

The application provides a PID control co-simulation method and device, and relates to the technical field of PID control. In the method, a control system mathematical model of a controlled object is first constructed by using a modeling platform GCKontrol, wherein the control system mathematical model of the controlled object comprises a PID controller; then, in a Python programming environment Jupyter, a differential evolution algorithm is used to select parameters of the PID controller, so that a target performance function meets a predetermined index level; finally, the control system mathematical model of the controlled object is subjected to PID control co-simulation through a Python API interface and the GCKontrol. In this way, the differential evolution algorithm is used to optimize the parameters of the PID controller in the Jupyter, and the optimized parameters are used for PID control co-simulation, so that the simulation effect of the PID control can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of PID control technology, and in particular to a co-simulation method and apparatus for PID control. Background Technology

[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, so the optimization of PID control parameters has become an increasingly important focus in industry. Traditional parameter optimization methods, such as indirect optimization, gradient method, and simplex method, are often prone to getting stuck in local optima or being sensitive to initial values, leading to optimization failure and poor simulation results of PID control.

[0003] In conclusion, improving the simulation effect of PID control is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention

[0004] In view of this, this application provides a co-simulation method and apparatus for PID control, aiming to improve the simulation effect of PID control.

[0005] Firstly, this application provides a co-simulation method for PID control, including:

[0006] A mathematical model of the control system of the controlled object is constructed using the modeling platform GCKontrol; the mathematical model of the control system 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 index level.

[0008] The mathematical model of the control system of the controlled object is subjected to PID control co-simulation using the Python API interface and the GCKontrol.

[0009] Optionally, the parameters of the PID controller include proportional parameters, integral parameters, and derivative parameters.

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

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

[0012] N individuals are randomly generated using a random function; where N is a positive integer.

[0013] A population is formed using the N individuals; each individual in the population is a vector consisting of a proportional parameter, an integral parameter, and a differential parameter.

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

[0015] The target performance function is calculated using the parameters.

[0016] Determine whether a preset condition is met; the preset condition is that the parameters converge or the target performance function meets the predetermined index level.

[0017] If so, output the parameters.

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

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

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

[0021] The target performance function is calculated using the parameters.

[0022] Determine whether the preset conditions are met.

[0023] Secondly, this application provides a co-simulation device for PID control, comprising:

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

[0025] The selection module is used in the Jupyter Python programming environment to select the parameters of the PID controller using the differential evolution algorithm, so that the target performance function meets the predetermined index level.

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

[0027] Optionally, the parameters of the PID controller include proportional parameters, integral parameters, and derivative parameters.

[0028] Optionally, the selection module includes:

[0029] The setting unit is used to set the value range of the proportional parameter, the integral parameter and the differential parameter respectively in the Python programming environment Jupyter;

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

[0031] A constitutive unit is used to form a population using the N individuals; the individuals in the population are vectors composed of a proportional parameter, an integral parameter, and a differential parameter.

[0032] The first decoding unit is used to decode an individual in the population into parameters corresponding to that individual.

[0033] The first calculation unit is used to calculate the target performance function using the parameters;

[0034] The first judgment unit is used to determine whether a preset condition is met; the preset condition is that the parameter converges or the target performance function meets the predetermined index level.

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

[0036] Optionally, the device further includes:

[0037] The processing unit is used to process the population using a differential evolution algorithm if the population is not otherwise specified, in order to obtain the next generation population.

[0038] The second decoding unit is used to decode individuals in the next generation population into parameters corresponding to those individuals.

[0039] The second calculation unit is used to calculate the target performance function using the parameters;

[0040] The second judgment unit is used to determine whether the preset condition is met.

[0041] Thirdly, embodiments of this application provide a computer device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements a co-simulation method for PID control as described in any of the embodiments of the first aspect of this application.

[0042] Fourthly, embodiments of this application provide a computer-readable storage medium storing instructions that, when executed on a terminal device, cause the terminal device to perform a co-simulation method for PID control as described in any of the embodiments of the first aspect of this application.

[0043] This application provides a co-simulation method for PID control. When executing the method, a mathematical model of the controlled object's control system is first constructed using the modeling platform GCKontrol. This mathematical model includes a PID controller. Then, in the Python programming environment Jupyter, the parameters of the PID controller are selected using a differential evolution algorithm to ensure the target performance function meets a predetermined index level. Finally, a co-simulation of PID control is performed on the mathematical model of the controlled object's control system using the Python API interface and GCKontrol. This method, by optimizing the PID controller parameters using a differential evolution algorithm in Jupyter and then using the optimized parameters for PID control co-simulation, improves the simulation effect of PID control. Attached Figure Description

[0044] To more clearly illustrate the technical solutions in this embodiment or the prior art, the drawings used in the description of the embodiment or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0045] Figure 1 A flowchart illustrating a co-simulation method for PID control provided in an embodiment of this application;

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

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

[0048] Figure 4 A schematic diagram of the structure of a co-simulation device for PID control provided in an embodiment of this application;

[0049] Figure 5 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation

[0050] The technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. This application provides a co-simulation method and apparatus for PID control, relating to the field of PID control technology. The above are merely examples and do not limit the application field of the method and apparatus provided in this 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, so the optimization of PID control parameters has become an increasingly important focus in industry. Traditional parameter optimization methods, such as indirect optimization, gradient method, and simplex method, are often prone to getting stuck in local optima or being sensitive to initial values, leading to optimization failure and poor simulation results of PID control.

[0052] The inventors, through research, proposed the technical solution of this application. First, they utilize the modeling platform GCKontrol to construct a mathematical model of the controlled object's control system. This model includes a PID controller. Then, in the Python programming environment Jupyter, they use a differential evolution algorithm to select the parameters of the PID controller, ensuring the target performance function meets a predetermined performance level. Finally, through the Python API interface and GCKontrol, they perform a co-simulation of PID control on the mathematical model of the controlled object's control system. This method, by optimizing the PID controller parameters using a differential evolution algorithm in Jupyter and then using the optimized parameters for PID control co-simulation, improves the simulation effect of PID control.

[0053] To enable those skilled in the art to better understand the present application, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments. Obviously, the described embodiments are only a part of the embodiments of the present application, and not all of them. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative effort 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 invention are shown in the accompanying drawings. Unless otherwise specified, the embodiments and features in the embodiments of the present application can be combined with each other.

[0054] See Figure 1 , Figure 1 A flowchart of a co-simulation method for PID control provided in this application embodiment includes:

[0055] S101: Construct a mathematical model of the control system of the controlled object using the modeling platform GCKontrol.

[0056] Using the modeling platform GCKontrol, a mathematical model of the control system of the controlled object is constructed, such as... Figure 2 As shown, Figure 2This is a schematic diagram of a mathematical model of a control system for a controlled object provided in an embodiment of this application. The mathematical model of the control system for the controlled object consists of an input / output module, a transfer function module, an integral module, a derivative module, and an addition / subtraction module. The transfer function represents the controlled object model after Laplace transform. The input module represents the system's command signal, and the output module represents the controlled object's output signal. The two signals are processed by the addition / subtraction module to obtain the tracking deviation, which is used to drive the controller output. The controller is a standard PID controller composed of proportional, integral, and derivative modules. The proportional parameter is defined as K in the GCK data dictionary. p The integral parameter is defined as K in the GCK data dictionary. i The differential parameter is defined as K in the GCK data dictionary. d .

[0057] S102: 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.

[0058] Differential Evolution (DE) is a stochastic heuristic search algorithm that simulates the evolutionary development of biological populations in nature based on the principle of "survival of the fittest." It has good robustness and powerful global search capabilities.

[0059] Differential evolutionary algorithm (DEA) retains the population-based global search strategy, employing real-number encoding, simple mutation operations based on differences, and a one-to-one competitive survival strategy, thus reducing the complexity of genetic operations. Simultaneously, DEA's unique memory capability allows it to dynamically track the current search status and adjust its search strategy, exhibiting strong global convergence and robustness. Furthermore, it does not require the characteristic information of the problem, making it suitable for solving optimization problems in complex environments that cannot be solved using conventional mathematical programming methods. DEA can also be used for trajectory planning.

[0060] Differential evolution algorithm performs mutation, crossover, and selection operations based on the difference vectors between parent individuals. Its basic idea is to start from a randomly generated initial population, generate a new individual by weighting the vector difference between any two individuals in the population and summing it with a third individual according to certain rules. Then, the new individual is compared with a pre-determined individual in the current population. If the fitness value of the new individual is better than that of the compared individual, the new individual replaces the old individual in the next generation. Otherwise, the old individual is preserved. Through continuous iterative calculation, good individuals are retained and bad individuals are eliminated, guiding the search process to approach the optimal solution.

[0061] The parameters of the PID controller are selected to ensure that the target performance function meets the predetermined target level. Specifically, this involves selecting an appropriate proportional parameter K. p Integral parameter K i and differential parameter K d This allows the target performance function J to reach its optimal value, where J is an index function related to the tracking deviation, overshoot, and control input amplitude of the control system response characteristics.

[0062] To obtain satisfactory transient dynamic characteristics, the time integral performance index of the absolute value of the tracking deviation is used as an important component of the objective function. To prevent excessive control input, a squared term of the control input is added to the objective function. Simultaneously, to minimize overshoot, the overshoot is incorporated as part of the objective function to form the complete objective function.

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

[0064]

[0065] Where w1 is the scaling parameter K p w2 is the integration parameter K i w3 is the differential parameter K d e represents the tracking deviation; t represents time; and u represents the control input.

[0066] Specifically, in the Jupyter programming environment of Python, the steps for finding the optimal index function and optimizing PID control parameters using the differential evolution algorithm are as follows:

[0067] (1) is the proportional parameter K p Integral parameter K i and differential parameter K d Set a general range of values:

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

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

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

[0071] (2) Randomly generate N individuals using a random function, where N is a positive integer. Use these N individuals to form a population, where the individuals in the population are determined by a proportionality parameter K.p One integration parameter K i And a differential parameter K d The vector formed.

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

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

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

[0075] S103: Perform PID control co-simulation on the mathematical model of the control system of the controlled object through Python API interface and GCKontrol.

[0076] We use the GCKontrol Python API to obtain the name of the currently running library and the necessary variable values. Here, we choose dexterity and maximum space range as the objective function to optimize. The specific steps are as follows: First, use GCKontrol to obtain the currently open project, then set the simulation time, simulation step size, and sampling step size, and then obtain the variable setting module. Next, initialize the population size and number of iterations and set the objective function. Then, we iteratively call the API to simulate, performing mutation, crossover, and boundary condition handling. We then calculate the objective function and select parameters, determining whether the termination condition has been met. If so, the selected parameters are output as the optimal PID parameter values; otherwise, we jump to the step of iteratively calling the API to simulate or calculating the objective function.

[0077] In the embodiments provided in this application, a mathematical model of the control system of the controlled object is first constructed using the modeling platform GCKontrol. This mathematical model includes a PID controller. Then, in the Python programming environment Jupyter, the parameters of the PID controller are selected using a differential evolution algorithm to ensure that the target performance function meets a predetermined index level. Finally, a PID control co-simulation is performed on the mathematical model of the control system of the controlled object through the Python API interface and GCKontrol. This method of optimizing the PID controller parameters using a differential evolution algorithm in Jupyter and then using the optimized parameters for PID control co-simulation improves the simulation effect of PID control.

[0078] The above describes some specific implementations of the co-simulation method for PID control provided in the embodiments of this application. Based on this, this application also provides a corresponding device. The device provided in the embodiments of this application will be described below from the perspective of functional modularity.

[0079] See Figure 4 , Figure 4 This is a schematic diagram of a co-simulation device for PID control provided in an embodiment of this application. The co-simulation device 400 for PID control includes:

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

[0081] Module 420 is selected to select the parameters of the PID controller using the differential evolution algorithm in the Python programming environment Jupyter, so that the target performance function meets the predetermined index level.

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

[0083] Optionally, the parameters of the PID controller include proportional parameters, integral parameters, and derivative parameters.

[0084] Optionally, the selection module 420 includes:

[0085] The setting unit is used to set the value range of the proportional parameter, the integral parameter and the differential parameter respectively in the Python programming environment Jupyter;

[0086] A random generation unit is used to randomly generate N individuals using a random function; where N is a positive integer.

[0087] A constitutive unit is used to form a population using the N individuals; the individuals in the population are vectors composed of a proportional parameter, an integral parameter, and a differential parameter.

[0088] The first decoding unit is used to decode an individual in the population into parameters corresponding to that individual.

[0089] The first calculation unit is used to calculate the target performance function using the parameters;

[0090] The first judgment unit is used to determine whether a preset condition is met; the preset condition is that the parameter converges or the target performance function meets the predetermined index level.

[0091] An output unit is used to output the parameter if the condition is met.

[0092] Optionally, the device 400 further includes:

[0093] The processing unit is used to process the population using a differential evolution algorithm if the population is not otherwise specified, in order to obtain the next generation population.

[0094] The second decoding unit is used to decode individuals in the next generation population into parameters corresponding to those individuals.

[0095] The second calculation unit is used to calculate the target performance function using the parameters;

[0096] The second judgment unit is used to determine whether the preset condition is met.

[0097] This application also provides corresponding devices and computer storage media for implementing the solutions provided in this application.

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

[0099] Bus 04 represents one or more of several bus architectures, including memory buses or memory controllers, peripheral buses, graphics acceleration ports, processors, or local buses using any of the various bus architectures. Examples of these architectures include, but are not limited to, the Industry Standard Architecture (ISA) bus, the Micro Channel Architecture (MAC) bus, the Enhanced ISA bus, the Video Electronics Standards Association (VESA) local bus, and the Peripheral Component Interconnect (PCI) bus.

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

[0101] 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. Computer device 01 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage system 11 may be used to read and write non-removable, non-volatile magnetic media (…). Figure 5 Not shown; usually referred to as a "hard drive"). Although Figure 5 Not shown, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk") and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 04 via one or more data media interfaces. Memory 08 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of the embodiments of the present invention.

[0102] A program / utility 12 having a set (at least one) of program modules 13 may be stored in, for example, memory 08. Such program modules 13 include, but are not limited to, an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include an implementation of a network environment. Program modules 13 typically perform the functions and / or methods described in the embodiments of the present invention.

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

[0104] The processor unit 03 executes various functional applications and data processing by running programs stored in the system memory 08, such as implementing a co-simulation method for PID control provided in the embodiments of this application.

[0105] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0106] As can be seen from the above description of the embodiments, those skilled in the art can clearly understand that all or part of the steps in the methods of the above embodiments can be implemented by means of software plus a general-purpose hardware platform. Based on this understanding, the technical solution of this application can be embodied in the form of a software product. This computer software product can be stored in a storage medium, such as a read-only memory (ROM) / RAM, magnetic disk, optical disk, etc., including several instructions to cause a computer device (which may be a personal computer, a server, or a network communication device such as a router) to execute the methods described in various embodiments or some parts of the embodiments of this application.

[0107] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on its differences from other embodiments. In particular, the apparatus embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without creative effort.

[0108] The above description is merely an exemplary implementation of this application and is not intended to limit the scope of protection of this application.

Claims

1. A co-simulation method for PID control, characterized in that, include: A mathematical model of the control system of the controlled object is constructed using the modeling platform GCKontrol; the mathematical model of the control system of the controlled object includes a PID controller; the parameters of the PID controller include proportional parameters, integral parameters, and derivative parameters; 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. The step of selecting parameters for the PID controller using the differential evolution algorithm in the Python programming environment Jupyter, so that the target performance function meets a predetermined index level, includes: In the Python programming environment Jupyter, the value ranges of the proportional parameter, the integral parameter, and the differential parameter are set respectively; N individuals are randomly generated using a random function; where N is a positive integer. A population is formed using the N individuals; each individual in the population is a vector consisting of a proportional parameter, an integral parameter, and a differential parameter. Decode the individuals in the population into the parameters corresponding to those individuals; The target performance function is calculated using the parameters. Determine whether a preset condition is met; the preset condition is that the parameters converge or the target performance function meets the predetermined index level. If so, output the parameters; The mathematical model of the control system of the controlled object is subjected to PID control co-simulation using the Python API interface and the GCKontrol.

2. The method according to claim 1, characterized in that, After determining whether the preset condition is met, the method further includes: If not, the population is processed using the differential evolution algorithm to obtain the next generation population; Decode the individuals in the next generation population into the parameters corresponding to those individuals; The target performance function is calculated using the parameters. Determine whether the preset conditions are met.

3. A co-simulation device for PID control, characterized in that, include: A construction module is used to construct a mathematical model of the control system of the controlled object using the modeling platform GCKontrol; the mathematical model of the control system of the controlled object includes a PID controller; the parameters of the PID controller include proportional parameters, integral parameters, and derivative parameters; The selection module is used in the Jupyter Python programming environment to select the parameters of the PID controller using the differential evolution algorithm, so that the target performance function meets the predetermined index level. The selection module includes: The setting unit is used to set the value range of the proportional parameter, the integral parameter and the differential parameter respectively in the Python programming environment Jupyter; A random generation unit is used to randomly generate N individuals using a random function; where N is a positive integer. A constitutive unit is used to form a population using the N individuals; the individuals in the population are vectors composed of a proportional parameter, an integral parameter, and a differential parameter. The first decoding unit is used to decode an individual in the population into parameters corresponding to that individual. The first calculation unit is used to calculate the target performance function using the parameters; The first judgment unit is used to determine whether a preset condition is met; the preset condition is that the parameter converges or the target performance function meets the predetermined index level. An output unit is used to output the parameter if the condition is met. The co-simulation module is used to perform PID control co-simulation on the mathematical model of the control system of the controlled object through the Python API interface and the GCKontrol.

4. The apparatus according to claim 3, characterized in that, The device further includes: The processing unit is used to process the population using a differential evolution algorithm if the population is not otherwise specified, in order to obtain the next generation population. The second decoding unit is used to decode individuals in the next generation population into parameters corresponding to those individuals. The second calculation unit is used to calculate the target performance function using the parameters; The second judgment unit is used to determine whether the preset condition is met.

5. 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 the processor, when executing the computer program, implements the co-simulation method for PID control as described in any one of claims 1-2.

6. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores instructions that, when executed on a terminal device, cause the terminal device to perform the co-simulation method of PID control as described in any one of claims 1-2.

Citation Information

Patent Citations

  • 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