A PID controller gain parameter design method, device, electronic equipment and medium

The near-optimal gain parameters are calculated through the fuzzy PID control algorithm and combined with the particle swarm algorithm optimization, the local optimal problem of PID controller gain parameters in complex systems is solved, ensuring that the search range is within the feasible solution range, and the control performance and stability are improved .

CN117389133BActive Publication Date: 2024-12-06CHINA HUBEI LONGZHONG LABORATORY +1
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202311511525.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-14
Publication Date
2024-12-06
Estimated Expiration
2043-11-14

AI Technical Summary

Technical Problem

The gain parameters of the PID controller are difficult to meet the control performance and stability requirements in complex multivariable and nonlinear systems, and the uncertainty of the initial position selection of the particle swarm optimization algorithm causes the search range to be not within the feasible solution range, resulting in the gain parameters being trapped in the local maximum. Excellent or not feasible.

Method used

The fuzzy PID control algorithm is used to calculate the near-optimal gain parameters to initialize the initial position of the particle swarm, and optimize the optimal gain parameters based on the particle swarm algorithm to ensure that the population search range is within the feasible solution range.

Benefits of technology

The problem of uncertainty in the initial position selection of particle swarm optimization is solved, ensuring that the population search range is within the feasible solution range, and improving the optimization effect of the PID controller gain parameters.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117389133B_ABST
    Figure CN117389133B_ABST
Patent Text Reader

Abstract

The present invention relates to a PID controller gain parameter design method, device, electronic device and medium, and the method includes: determining the constraint conditions of the control variable of the target PID controller, the control variable is the gain parameter of the target PID controller; calculating the control variable based on the fuzzy PID control algorithm to obtain the near-optimal gain parameter of the target PID controller; obtaining the parameters of the particle swarm algorithm, and obtaining the population initial position based on the parameters of the particle swarm algorithm and the near-optimal gain parameter; iteratively determining the current speed and position of the population based on the initial position of the population, and updating the population speed and position within the constraint conditions based on the current speed and position of the population; when it is determined that the iterative update meets the termination condition, determining the global optimal position of the population, and the global optimal position is the optimal gain parameter of the target PID controller. The present invention solves the problem of uncertainty in the selection of the initial position of the population.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of control systems, and in particular to a PID controller gain parameter design method, device, electronic equipment and medium. Background Art

[0002] PID (proportional-integral-derivative control) control is a classic feedback control algorithm used to adjust and stabilize system output. It has a simple structure, high stability and good robustness. However, the gain parameters of PID control are usually obtained by manual trial and error. The PID control gain parameters obtained by this method cannot meet the control performance and control stability requirements of complex multivariable and nonlinear systems.

[0003] The "particle swarm optimization PID control" method optimizes the gain parameters of the PID controller through the particle swarm optimization algorithm. In theory, it can solve the problem of time-consuming and inaccurate manual adjustment of the PID control gain parameters by trial and error. However, in the actual application of this method, due to the uncertainty in the selection of the initial position of the particle swarm optimization algorithm population and the constraints of the population search range may not be within the feasible solution range, on the one hand, it will lead to a sharp increase in the number of particles and the number of iterations in the optimization process, and on the other hand, it will also cause the gain parameters of the PID control to fall into the local optimum or even infeasible. Summary of the invention

[0004] In view of this, it is necessary to provide a PID controller gain parameter design method to solve the problem that the gain parameters of PID control fall into local optimum or even become infeasible.

[0005] In order to solve the above problems, the present invention provides a PID controller gain parameter design method, comprising:

[0006] Determine a constraint condition of a control variable of a target PID controller, wherein the control variable is a gain parameter of the target PID controller;

[0007] Calculating the control variable based on a fuzzy PID control algorithm to obtain a near-optimal gain parameter of the target PID controller;

[0008] Obtaining parameters of a particle swarm algorithm, and obtaining an initial position of a population based on the parameters of the particle swarm algorithm and the near-optimal gain parameter;

[0009] Iteratively determine the current speed and position of the population based on the initial position of the population, and update the population speed and position within the constraint conditions based on the current speed and position of the population;

[0010] When it is determined that the iterative update satisfies the termination condition, the global optimal position of the population is determined, and the global optimal position is the optimal gain parameter of the target PID controller.

[0011] In some possible implementations, the control gain parameters include proportional gain, integral gain and differential gain.

[0012] In some possible implementations, the calculating the control variable based on the fuzzy PID control algorithm to obtain the near-optimal gain parameter of the target PID controller includes:

[0013] Fuzzifying the control error and the rate of change of the control system corresponding to the PID controller to determine the fuzzy rule table of the control gain parameter;

[0014] Inferring the membership of the gain parameter based on the fuzzy rule table;

[0015] The near-optimal gain parameter of the target PID controller is determined based on the fuzzy rule table and the membership degree.

[0016] In some possible implementations, iteratively determining the current speed and position of the population based on the initial position of the population, and updating the population speed and position within the constraint condition based on the current speed and position of the population, includes:

[0017] Iteratively determine the current speed and position of the population based on the initial position of the population;

[0018] Calculate the individual fitness value corresponding to the updated population position based on the current speed and position of the population;

[0019] The individual fitness value corresponding to the updated population position is compared with the individual optimal fitness value to obtain a comparison result, and the population individual optimal position, the population individual optimal fitness value, the population global optimal position and the population global optimal fitness value are updated according to the comparison result.

[0020] In some possible implementations, the calculation formula for the speed corresponding to the initial position of the population is:

[0021]

[0022] In the formula, Represents a random number between 0 and 1; is the proportional coefficient used to adjust the size of the population speed; represents the velocity corresponding to the initial position of the population, for OK Matrix of columns ; , , The value range is .

[0023] In some possible implementations, the calculation formula for the initial position of the population is:

[0024]

[0025] In the formula, represents the initial position of the population; Represents a random number between 0 and 1; Indicates the number of rows corresponding to the population matrix; Indicates the number of columns corresponding to the population matrix; represents the near-optimal gain parameter; Indicates the generation of a matrix with all elements set to 1; Indicates the lower limit of the proportionality coefficient; Indicates the upper limit of the proportionality factor.

[0026] In some possible implementations, the updating formula of the population velocity is:

[0027]

[0028] In the formula, represents the inertia weight; Indicates the part that affects the individual speed of the previous iteration; , represents the learning factor; Represents a random number between 0 and 1; represents the optimal influence part of an individual; represents the influencing part of the global optimum.

[0029] On the other hand, the present invention also provides a PID controller gain parameter design device, comprising:

[0030] A parameter setting module, used to determine the constraint conditions of the control variable of the target PID controller, wherein the control variable is the gain parameter of the target PID controller;

[0031] A near-optimal gain parameter acquisition module, used to calculate the control variable based on a fuzzy PID control algorithm to obtain a near-optimal gain parameter of the target PID controller;

[0032] An initial value acquisition module, used to acquire the parameters of the particle swarm algorithm, and obtain the initial position of the population based on the parameters of the particle swarm algorithm and the near-optimal gain parameters;

[0033] A population data acquisition module, used for iteratively determining the current speed and position of the population based on the initial position of the population, and updating the population speed and position within the constraint conditions based on the current speed and position of the population;

[0034] The optimal gain parameter determination module determines the global optimal position of the population when it is determined that the iterative update meets the termination condition, and the global optimal position is the optimal gain parameter of the target PID controller.

[0035] On the other hand, the present invention also provides an electronic device, including a memory and a processor, wherein:

[0036] The memory is used to store programs;

[0037] The processor is coupled to the memory and is used to execute the program stored in the memory to implement the steps in a PID controller gain parameter design method described in any one of the above implementations.

[0038] On the other hand, the present invention also provides a computer-readable storage medium for storing computer-readable programs or instructions, which, when executed by a processor, can implement the steps in a PID controller gain parameter design method described in any of the above-mentioned implementation methods.

[0039] The beneficial effect of adopting the above embodiment is: the present invention provides a PID controller gain parameter design method, first determine the constraint conditions of the target PID controller control variable, the control variable is the gain parameter of the target PID controller, then calculate the control variable based on the fuzzy PID control algorithm, obtain the near-optimal gain parameter of the target PID controller, and finally obtain the optimal gain parameter of the target PID controller based on the particle swarm algorithm. The present invention uses the near-optimal gain parameter calculated by the fuzzy PID control algorithm to initialize the initial position of the population, and then obtains the optimal gain parameter of the target PID controller based on the particle swarm algorithm, which solves the uncertainty problem of the initial position selection of the population, and at the same time, constrains the population search range to be near the near-optimal gain parameter at the initial population position, ensuring that the population search range is within the feasible solution range. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] Figure 1 A method flow chart of an embodiment of a PID controller gain parameter design method provided by the present invention;

[0041] Figure 2 A flow chart of a method for calculating the individual optimal position, individual optimal fitness value, global optimal position and global optimal fitness value corresponding to the initial position of a population according to an embodiment of a PID controller gain parameter design method provided by the present invention;

[0042] Figure 3 A calculation flow chart of updating individual optimal position, individual optimal fitness value, global optimal position and global optimal fitness value in an embodiment of a PID controller gain parameter design method provided by the present invention;

[0043] Figure 4 A schematic diagram of the structure of an embodiment of a PID controller gain parameter design device provided by the present invention;

[0044] Figure 5 A schematic structural diagram of an embodiment of an electronic device provided by the present invention. DETAILED DESCRIPTION

[0045] The preferred embodiments of the present invention will be described in detail below in conjunction with the accompanying drawings, wherein the accompanying drawings constitute a part of this application and are used together with the embodiments of the present invention to illustrate the principles of the present invention, but are not used to limit the scope of the present invention.

[0046] Figure 1 A schematic diagram of an embodiment of a PID controller gain parameter design method provided by the present invention is shown in FIG. Figure 1 As shown, a PID controller gain parameter design method includes:

[0047] S101, determining a constraint condition of a control variable of a target PID controller, wherein the control variable is a gain parameter of the target PID controller;

[0048] S102, calculating the control variable based on a fuzzy PID control algorithm to obtain a near-optimal gain parameter of the target PID controller;

[0049] S103, obtaining parameters of a particle swarm algorithm, and obtaining an initial position of a population based on the parameters of the particle swarm algorithm and the near-optimal gain parameter;

[0050] S104, iteratively determining the current speed and position of the population based on the initial position of the population, and updating the population speed and position within the constraint conditions based on the current speed and position of the population;

[0051] S105. When it is determined that the iterative update satisfies the termination condition, determine the global optimal position of the population, where the global optimal position is the optimal gain parameter of the target PID controller.

[0052] Compared with the prior art, the present embodiment provides a PID control gain parameter design method, first determining the constraint conditions of the control variable of the target PID controller, the control variable is the gain parameter of the target PID controller, then calculating the control variable based on the fuzzy PID control algorithm to obtain the near-optimal gain parameter of the target PID controller, and finally obtaining the optimal gain parameter of the target PID controller based on the particle swarm algorithm. The present invention uses the near-optimal gain parameter calculated by the fuzzy PID control algorithm to initialize the initial position of the population, and then obtains the optimal gain parameter of the target PID controller based on the particle swarm algorithm, which solves the problem of uncertainty in the selection of the initial position of the population, and at the same time, constrains the population search range to be near the near-optimal gain parameter at the initial population position, ensuring that the population search range is within the feasible solution range.

[0053] It should be noted that a control system refers to a management system with its own goals and functions, consisting of a control subject, a control object, and a control medium.

[0054] In some embodiments of the present invention, the control gain parameters include proportional gain, integral gain and differential gain.

[0055] In a specific embodiment of the present invention, in step S101, the control variables, constraints and control targets of the control system are determined. The PID control gain parameter is selected as the control variable, and a preliminary constraint is imposed on it according to its own value; and the control target of the control system is determined according to the control requirements, and is regarded as the individual and global fitness value in the particle swarm optimization process. In practical applications, specifically, if it is a hotel automatic door control system, the ultimate control target is to control the opening and closing of the door; if it is a swimming pool timed water filling control system, the ultimate control target is to control the water level of the swimming pool. This embodiment only lists several control systems.

[0056] In some embodiments of the present invention, in step S102, the control variable is calculated based on the fuzzy PID control algorithm to obtain the near-optimal gain parameter of the target PID controller, including:

[0057] Fuzzifying the control error and the rate of change of the control system corresponding to the PID controller to determine the fuzzy rule table of the control gain parameter;

[0058] Inferring the membership of the gain parameter based on the fuzzy rule table;

[0059] The near-optimal gain parameter of the target PID controller is determined based on the fuzzy rule table and the membership degree.

[0060] In a specific embodiment of the present invention, in step S102, the control variable is calculated based on the fuzzy PID control algorithm to obtain the near-optimal gain parameter of the target PID controller, which specifically includes the following steps:

[0061] Step 1: First, use two-dimensional fuzzy control to control the system error and its rate of change Fuzzification, including determination based on experimental data and The domains are and , and divide the domain and determine the membership function.

[0062] Step 2: Then perform fuzzy reasoning, including determining the fuzzy rule table of PID control gain parameters, and inferring the membership of the PID control gain parameters of the fuzzy output through the fuzzy rule table.

[0063] Step 3: Finally, the centroid method is used for defuzzification. According to the experimental data, the domains of the PID control gain parameters are determined as follows: , , , and divide the domain and determine the membership function.

[0064] Step 4: By adjusting the domain, fuzzy rule table, and membership function multiple times, a set of near-optimal gain parameters that meet the control objectives are obtained. .

[0065] In a specific embodiment of the present invention, in step S103, obtaining the parameters of the particle swarm algorithm includes:

[0066] According to research findings: Inertia factor Generally, the given value is The algorithm converges better and has a faster constant , Generally, the given value is 2. The dimension size here , population size and the maximum number of iterations As needed, the initial population velocity , The calculation formula is as follows:

[0067]

[0068] in: It is a proportional coefficient used to adjust the size of the population speed. Its value can be adjusted according to the population search range and the number of iterations. obey distributed; for OK A matrix of columns, , at the initial population velocity The expression constrains , , The value range is .

[0069] In a specific embodiment of the present invention, in step S103, obtaining the population initial position based on the parameters of the particle swarm algorithm and the near-optimal gain parameter includes:

[0070] First, the near-optimal gain parameter obtained in step 102 is used generate rows and each row is The matrix ;

[0071] Secondly, by Multiplying each element in by a different coefficient means randomly scattering each particle in the matrix within the search range;

[0072] The coefficient matrix is ​​determined as , by comparing with the matrix Point product to get the initial position of the population The calculation formula is as follows:

[0073]

[0074] This formula is in the initial population position At the same time, the population search range is constrained, where: for OK A matrix of columns, , belong , belong , belong ; , are the upper and lower limits of the proportionality coefficient, respectively. , whose value can be based on Adjustment; Indicates generation OK A matrix whose columns are all 1.

[0075] like Figure 2 A flow chart of a method for calculating the individual optimal position, individual optimal fitness value, global optimal position and global optimal fitness value corresponding to the initial position of a population according to an embodiment of a PID controller gain parameter design method provided by the present invention;

[0076] In some embodiments of the present invention, the iterative determination of the current speed and position of the population based on the initial position of the population, and the updating of the population speed and position within the constraint condition based on the current speed and position of the population include:

[0077] Iteratively determine the current speed and position of the population based on the initial position of the population;

[0078] Calculate the individual fitness value corresponding to the updated population position based on the current speed and position of the population;

[0079] The individual fitness value corresponding to the updated population position is compared with the individual optimal fitness value to obtain a comparison result, and the population individual optimal position, the population individual optimal fitness value, the population global optimal position and the population global optimal fitness value are updated according to the comparison result.

[0080] In some embodiments of the present invention, the calculation formula for the speed corresponding to the initial position of the population is:

[0081]

[0082] In the formula, Represents a random number between 0 and 1; is the proportional coefficient used to adjust the size of the population speed; represents the velocity corresponding to the initial position of the population, for OK Matrix of columns ; , , The value range is .

[0083] In some embodiments of the present invention, the calculation formula for the initial position of the population is:

[0084]

[0085] In the formula, represents the initial position of the population; Represents a random number between 0 and 1; Indicates the number of rows corresponding to the population matrix; Indicates the number of columns corresponding to the population matrix; represents the near-optimal gain parameter; Indicates the generation of a matrix with all elements set to 1; Indicates the lower limit of the proportionality coefficient; Indicates the upper limit of the proportionality factor.

[0086] In some embodiments of the present invention, the updating formula of the population velocity is:

[0087]

[0088] In the formula, represents the inertia weight; Indicates the part that affects the individual speed of the previous iteration; , represents the learning factor; Represents a random number between 0 and 1; represents the optimal influence part of an individual; represents the influencing part of the global optimum.

[0089] In a specific embodiment of the present invention, the population velocity is updated within the constraints. With location , Figure 3 A calculation flow chart of updating individual optimal position, individual optimal fitness value, global optimal position and global optimal fitness value is provided in an embodiment of a PID controller gain parameter design method provided by the present invention, such as Figure 3 As shown, recalculate The fitness value of each particle in and by Compare and update the individual best position, individual best fitness value, global best position, and global best fitness value.

[0090] The speed update formula is as follows:

[0091]

[0092] The speed update formula consists of three parts: the previous speed part , the optimal influence part of an individual And the impact part of the global optimal .

[0093] The position update formula is as follows:

[0094]

[0095] The position update formula consists of two parts: the previous position part , updated speed part .

[0096] Determine whether the iterative update meets the termination condition. If the termination condition is met, continue to execute to obtain the global optimal position, otherwise execute the update.

[0097] The final global optimal position As the optimal gain parameter of the PID controller, , , .

[0098] In order to better implement a PID controller gain parameter design method in an embodiment of the present invention, based on a PID controller gain parameter design method, correspondingly, as Figure 4 As shown, an embodiment of the present invention further provides a PID controller gain parameter design device, a PID controller gain parameter design device 400 includes:

[0099] A parameter setting module 401 is used to determine the constraint conditions of the control variables of the target PID controller, wherein the control variables are the gain parameters of the target PID controller;

[0100] A near-optimal gain parameter acquisition module 402 is used to calculate the control variable based on a fuzzy PID control algorithm to obtain a near-optimal gain parameter of the target PID controller;

[0101] An initial value acquisition module 403 is used to acquire the parameters of the particle swarm algorithm, and obtain the initial position of the population based on the parameters of the particle swarm algorithm and the near-optimal gain parameters;

[0102] A population data acquisition module 404, configured to iteratively determine the current speed and position of the population based on the initial position of the population, and update the speed and position of the population within the constraint conditions based on the current speed and position of the population;

[0103] The optimal gain parameter determination module 405 determines the global optimal position of the population when it is determined that the iterative update meets the termination condition, and the global optimal position is the optimal gain parameter of the target PID controller.

[0104] The PID controller gain parameter design device 400 provided in the above embodiment can implement the technical solution described in the above embodiment of a PID controller gain parameter design method. The specific implementation principles of the above modules or units can refer to the corresponding contents in the above embodiment of a PID controller gain parameter design method, which will not be repeated here.

[0105] like Figure 5 As shown, the present invention also provides an electronic device 500. The electronic device 500 includes a processor 501, a memory 502 and a display 503. Figure 5 Only some of the components of the electronic device 500 are shown, but it should be understood that it is not required to implement all of the components shown, and more or fewer components may be implemented instead.

[0106] In some embodiments, the processor 501 may be a central processing unit (CPU), a microprocessor or other data processing chip, used to run program codes or process data stored in the memory 502, such as a PID controller gain parameter design method in the present invention.

[0107] In some embodiments, the processor 501 may be a single server or a server group. The server group may be centralized or distributed. In some embodiments, the processor 501 may be local or remote. In some embodiments, the processor 501 may be implemented in a cloud platform. In one embodiment, the cloud platform may include a private cloud, a public cloud, a hybrid cloud, a community cloud, a distributed cloud, an internal cloud, a multi-cloud, etc., or any combination thereof.

[0108] In some embodiments, the memory 502 may be an internal storage unit of the electronic device 500, such as a hard disk or memory of the electronic device 500. In other embodiments, the memory 502 may also be an external storage device of the electronic device 500, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the electronic device 500.

[0109] Furthermore, the memory 503 may include both an internal storage unit of the electronic device 500 and an external storage device. The memory 502 is used to store application software installed in the electronic device 500 and various data.

[0110] In some embodiments, the display 503 may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, etc. The display 503 is used to display information on the electronic device 500 and to display a visual user interface. The components 501-503 of the electronic device 500 communicate with each other via a system bus.

[0111] In one embodiment, when the processor 501 executes a PID controller gain parameter design program in the memory 502, the following steps may be implemented:

[0112] Determine a constraint condition of a control variable of a target PID controller, wherein the control variable is a gain parameter of the target PID controller;

[0113] Calculating the control variable based on a fuzzy PID control algorithm to obtain a near-optimal gain parameter of the target PID controller;

[0114] Obtaining parameters of a particle swarm algorithm, and obtaining an initial position of a population based on the parameters of the particle swarm algorithm and the near-optimal gain parameter;

[0115] Iteratively determine the current speed and position of the population based on the initial position of the population, and update the population speed and position within the constraint conditions based on the current speed and position of the population;

[0116] When it is determined that the iterative update satisfies the termination condition, the global optimal position of the population is determined, and the global optimal position is the optimal gain parameter of the target PID controller.

[0117] It should be understood that: when the processor 501 executes a PID controller gain parameter design program in the memory 502, in addition to the above functions, other functions can also be implemented. For details, please refer to the description of the corresponding method embodiment above.

[0118] Furthermore, the embodiment of the present invention does not specifically limit the type of the electronic device 500 mentioned, and the electronic device 500 may be a portable electronic device such as a mobile phone, a tablet computer, a personal digital assistant (PDA), a wearable device, a laptop computer, etc. Exemplary embodiments of portable electronic devices include but are not limited to portable electronic devices equipped with IOS, Android, Microsoft or other operating systems. The above-mentioned portable electronic devices may also be other portable electronic devices, such as a laptop computer with a touch-sensitive surface (e.g., a touch panel). It should also be understood that in some other embodiments of the present invention, the electronic device 500 may not be a portable electronic device, but a desktop computer with a touch-sensitive surface (e.g., a touch panel).

[0119] Those skilled in the art will appreciate that all or part of the processes of the above-mentioned embodiments can be implemented by instructing related hardware through a computer program, and the program can be stored in a computer-readable storage medium, wherein the computer-readable storage medium is a disk, an optical disk, a read-only storage memory, or a random access memory, etc.

[0120] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by any technician familiar with the technical field within the technical scope disclosed by the present invention should be covered within the protection scope of the present invention.

Claims

1. A PID controller gain parameter design method, characterized in that: include: Determine the constraint conditions of the control variable of the target PID controller, the control variable is the gain parameter of the target PID controller, and the gain parameter includes proportional gain, integral gain and differential gain; Calculating the control variable based on a fuzzy PID control algorithm to obtain a near-optimal gain parameter of the target PID controller; Obtaining parameters of a particle swarm algorithm, and obtaining an initial position of a population based on the parameters of the particle swarm algorithm and the near-optimal gain parameter; Iteratively determine the current speed and position of the population based on the initial position of the population, and update the population speed and position within the constraint conditions based on the current speed and position of the population; When it is determined that the iterative update satisfies the termination condition, the global optimal position of the population is determined, and the global optimal position is the optimal gain parameter of the target PID controller.

2. The PID controller gain parameter design method according to claim 1, characterized in that: The control variable is calculated based on the fuzzy PID control algorithm to obtain the near-optimal gain parameter of the target PID controller, including: Fuzzifying the control error and the rate of change of the control system corresponding to the PID controller to determine the fuzzy rule table of the control gain parameter; Inferring the membership of the gain parameter based on the fuzzy rule table; The near-optimal gain parameter of the target PID controller is determined based on the fuzzy rule table and the membership degree.

3. The PID controller gain parameter design method according to claim 1, characterized in that: The iterative determination of the current speed and position of the population based on the initial position of the population, and updating the speed and position of the population within the constraint conditions based on the current speed and position of the population, comprises: Iteratively determine the current speed and position of the population based on the initial position of the population; Calculate the individual fitness value corresponding to the updated population position based on the current speed and position of the population; The individual fitness value corresponding to the updated population position is compared with the individual optimal fitness value to obtain a comparison result, and the population individual optimal position, the population individual optimal fitness value, the population global optimal position and the population global optimal fitness value are updated according to the comparison result.

4. The PID controller gain parameter design method according to claim 3, characterized in that: The calculation formula of the speed corresponding to the initial position of the population is: In the formula, Represents a random number between 0 and 1; is the proportional coefficient used to adjust the size of the population speed; represents the velocity corresponding to the initial position of the population, for OK Matrix of columns ; , , The value range is .

5. The PID controller gain parameter design method according to claim 1, characterized in that: The calculation formula for the initial position of the population is: In the formula, represents the initial position of the population; Represents a random number between 0 and 1; Indicates the number of rows corresponding to the population matrix; Indicates the number of columns corresponding to the population matrix; represents the near-optimal gain parameter; Indicates the generation of a matrix with all elements set to 1; Indicates the lower limit of the proportionality coefficient; Indicates the upper limit of the proportionality factor; Indicates that each line is The matrix of .

6. The PID controller gain parameter design method according to claim 1, characterized in that: The updating formula of the population velocity is: In the formula, represents the inertia weight; Indicates the part that affects the individual speed of the previous iteration; , represents the learning factor; Represents a random number between 0 and 1; represents the optimal influence part of an individual; represents the influencing part of the global optimum.

7. A PID controller gain parameter design device, characterized in that: include: A parameter setting module, used to determine the constraint conditions of the control variable of the target PID controller, wherein the control variable is the gain parameter of the target PID controller, and the gain parameter includes proportional gain, integral gain and differential gain; A near-optimal gain parameter acquisition module, used to calculate the control variable based on a fuzzy PID control algorithm to obtain a near-optimal gain parameter of the target PID controller; An initial value acquisition module, used to acquire the parameters of the particle swarm algorithm, and obtain the initial position of the population based on the parameters of the particle swarm algorithm and the near-optimal gain parameters; A population data acquisition module, used for iteratively determining the current speed and position of the population based on the initial position of the population, and updating the population speed and position within the constraint conditions based on the current speed and position of the population; The optimal gain parameter determination module determines the global optimal position of the population when it is determined that the iterative update meets the termination condition, and the global optimal position is the optimal gain parameter of the target PID controller.

8. An electronic device, characterized in that: comprising a memory and a processor, wherein: The memory is used to store programs; The processor is coupled to the memory and is used to execute the program stored in the memory to implement the steps in the PID controller gain parameter design method described in any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that: Used to store computer-readable programs or instructions, which, when executed by a processor, can implement the steps in a PID controller gain parameter design method as described in any one of claims 1 to 6 above.

Citation Information

Patent Citations

  • Wireless sensor network congestion control technology based on PID controller

    CN107070802A

  • Particle swarm fuzzy Smith temperature control method based on 3D printing nozzle

    CN111413863A

  • Battery energy storage active response-based load frequency control method for interconnected power system containing wind power

    CN114123249A

  • Control method of PID (Proportion Integration Differentiation) controller

    CN115755581A

  • PID (Proportion Integration Differentiation) optimization control method for temperature of heating furnace with uncontrolled air flow

    CN116203830A