PI parameter dynamic identification method and device based on improved quantum particle swarm optimization, medium and equipment
By improving the quantum particle swarm algorithm, constructing particle swarms and updating positions using Schrödinger's wave equation and chaos mapping model, dynamically optimizing the PI parameters of the energy storage device, solving the problem that traditional methods are difficult to cope with complex dynamic working conditions, and improving optimization efficiency and accuracy.
Patent Information
- Application Number
- CN202411717334.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-27
- Publication Date
- 2025-03-18
AI Technical Summary
Traditional PI parameter simulation methods are difficult to effectively deal with complex dynamic working conditions, resulting in a large deviation between the simulation optimization results and the actual operating results.
Using a method based on an improved quantum particle swarm algorithm, the particle swarm is constructed and randomly initialized under the set distribution probability, and the position of the particle swarm is updated using Schrödinger's wave equation and chaos mapping model, thereby dynamically optimizing the PI controller parameters.
When faced with complex and dynamic operating conditions, high optimization efficiency and accuracy are maintained, reducing the deviation between simulation optimization results and actual operating results.
Smart Images

Figure CN119647257A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of power system simulation modeling, and in particular to a PI parameter dynamic identification method, device, medium and equipment based on an improved quantum particle swarm algorithm. Background Art
[0002] In the power system, when a fault occurs (such as a grid short circuit or voltage drop), the energy storage device needs to quickly adjust the power and current output to maintain system stability and participate in the fault ride-through process. The PI parameters of the controller are the key factors that determine the response performance of the current loop and the power loop. By simulating and optimizing the PI parameters of the energy storage device, the performance of the controller can be significantly improved. However, traditional PI parameter simulation methods are often difficult to effectively cope with complex dynamic conditions, which easily leads to a large deviation between the simulation optimization results and the actual operating effects. Summary of the invention
[0003] Based on this, it is necessary to provide PI parameter dynamic identification methods, devices, media and equipment based on the improved quantum particle swarm algorithm to solve the problem that traditional PI parameter simulation methods are often difficult to effectively cope with complex dynamic working conditions, which easily leads to a large deviation between the simulation optimization results and the actual operating effects.
[0004] A PI parameter dynamic identification method based on an improved quantum particle swarm algorithm is characterized in that it is applied to a simulation model of an energy storage device, and the method comprises:
[0005] Constructing a particle swarm, and randomly initializing the position of the particle swarm based on a set distribution probability; wherein each particle in the particle swarm corresponds to each group of PI parameters to be identified in the simulation model;
[0006] Using the Schrödinger wave equation to update the position of the particle swarm, simulating the simulation model based on the updated position of the particle swarm, calculating the fitness value of each particle in the particle swarm according to the current simulation result, sorting the fitness values and updating the current optimal position of the particles in the particle swarm according to the sorting result;
[0007] Using a chaotic mapping model to update the position of the particle swarm, simulating the simulation model based on the updated position of the particle swarm, calculating the fitness value of each particle in the particle swarm according to the current simulation result, sorting the fitness values and updating the current optimal position of the particles in the particle swarm according to the sorting result;
[0008] If the current number of iterations does not reach the upper limit of the number of iterations, and the fitness value corresponding to the current optimal position does not reach the fitness threshold, then return to the step of updating the position of the particle swarm using the Schrödinger wave equation and subsequent steps until the current number of iterations reaches the upper limit of the number of generations, and / or the fitness value corresponding to the current optimal position reaches the fitness threshold, and output the current optimal position of the particle in the particle swarm as the identified PI parameter.
[0009] 2. The method according to claim 1, characterized in that the position of the particle group is randomly initialized based on the set distribution probability, comprising:
[0010] Set the distribution probability of the particle swarm, expressed as:
[0011]
[0012] In the above formula, F(Y) represents the cumulative probability of a particle appearing at position Y; Y represents the offset of the particle from the search center; L represents the control parameter that determines the search range of the particle;
[0013] Based on the distribution probability, the position of the particle group is randomly generated by a reverse sampling method.
[0014] 3. The method according to claim 1, characterized in that the position of the particle group is updated using the Schrödinger wave equation, which is expressed as:
[0015]
[0016]
[0017]
[0018] In the above formula, represents the next iteration position of the jth particle in the i-th dimension; represents the optimal position of the jth particle in the i-th dimension after the current update combining local and global information; β represents the preset expansion factor; Represents the current average optimal position of all particles; represents the current iteration position of the jth particle in the i-th dimension; u ij represents a uniform random number between 0 and 1; k represents a random number that determines whether the particle moves toward or away from the optimal point; Represents the randomly generated weight coefficient; Indicates the historical optimal position of the current particle; represents the global optimal position of all particles at present; M represents the size of particle swarm; represents the optimal position of the i-th particle in each dimension.
[0019] 4. The method according to claim 3, characterized in that the method further comprises:
[0020] The dilation factor is iteratively adjusted, expressed as:
[0021]
[0022] In the above formula, T max represents the upper limit of the number of iterations, and t represents the current number of iterations.
[0023] 5. The method according to claim 1, characterized in that the fitness value of each particle in the particle swarm is calculated according to the simulation result, expressed as:
[0024]
[0025] In the above formula, f fitness represents the fitness value; N represents the total number of data points; X n ′ represents the nth data point of the simulation model output; X n Represents the nth data point of the actual output of the energy storage device.
[0026] 6. The method according to claim 1, characterized in that the use of a chaotic mapping model to update the position of the particle swarm comprises:
[0027] Iteratively generate a chaotic sequence; wherein the chaotic sequence includes multiple chaotic disturbance values, and each chaotic disturbance value is generated in the following manner:
[0028]
[0029] In the above formula, represents the chaotic disturbance value generated by the dth dimension at the tth iteration; μ represents the preset chaotic factor;
[0030] The position of the particle swarm is updated based on the chaotic sequence, which is expressed as:
[0031]
[0032]
[0033] in, represents the next iteration position of the jth particle in the i-th dimension; Indicates the current iteration position of the jth particle in the i-th dimension; represents the velocity of the jth particle in the i-th dimension; γ represents the chaotic perturbation weight; k represents the perturbation proportional factor; Represents the upper and lower bounds of the search range of the jth particle in the ith dimension; chaos(l) represents the value of the lth item in the chaotic sequence.
[0034] 7. The method according to claim 6, characterized in that the method further comprises:
[0035] The chaotic perturbation weight and the perturbation proportional factor are iteratively adjusted, which can be expressed as:
[0036]
[0037]
[0038] In the above formula, γ(t) represents the chaotic perturbation weight at the tth iteration; γ max represents the upper limit of chaotic perturbation weight; T max Represents the maximum number of iterations of the chaotic mapping model; γ min represents the lower limit of chaotic perturbation weight; k(t) represents the perturbation proportional factor at the tth iteration; k max represents the upper limit of the disturbance proportional factor; α represents the attenuation rate parameter, α>1.
[0039] 8. A PI parameter dynamic identification device based on an improved quantum particle swarm algorithm, characterized in that the PI parameter dynamic identification device based on an improved quantum particle swarm algorithm comprises:
[0040] A particle swarm construction and initialization module, used to construct a particle swarm and randomly initialize the position of the particle swarm based on a set distribution probability; wherein each particle in the particle swarm corresponds to each group of PI parameters to be identified in the simulation model;
[0041] A first position updating module, used for updating the position of the particle swarm using the Schrödinger wave equation, simulating the simulation model based on the updated position of the particle swarm, calculating the fitness value of each particle in the particle swarm according to the current simulation result, sorting the fitness values and updating the current optimal position of the particles in the particle swarm according to the sorting result;
[0042] A second position updating module is used to update the position of the particle swarm using a chaotic mapping model, simulate the simulation model based on the updated position of the particle swarm, calculate the fitness value of each particle in the particle swarm according to the current simulation result, and sort the fitness values if they exist and update the current optimal position of the particles in the particle swarm according to the sorting result;
[0043] The loop judgment and output module is used to return to the step of updating the position of the particle swarm using the Schrödinger wave equation and subsequent steps if the current number of iterations does not reach the upper limit of the number of iterations and the fitness value corresponding to the current optimal position does not reach the fitness threshold, until the current number of iterations reaches the upper limit of the number of generations and / or the fitness value corresponding to the current optimal position reaches the fitness threshold, and output the current optimal position of the particle in the particle swarm as the identified PI parameter.
[0044] A computer-readable storage medium stores a computer program. When the computer program is executed by a processor, the processor executes the steps of the above-mentioned PI parameter dynamic identification method based on the improved quantum particle swarm algorithm.
[0045] A terminal device includes a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the above-mentioned PI parameter dynamic identification method based on the improved quantum particle swarm algorithm.
[0046] The present invention provides a PI parameter dynamic identification method, device, medium and equipment based on an improved quantum particle swarm algorithm, which constructs a particle swarm and performs random initialization under a set probability distribution, and uses the Schrödinger wave equation and a chaotic mapping model to update the position of the particle swarm, thereby dynamically optimizing the PI controller parameters. After each update, the fitness value is calculated by simulation and the optimal position of the particle is adjusted until the upper limit of the number of generations or the fitness threshold is met. This process can maintain high optimization efficiency and accuracy in the face of complex and dynamic working condition changes by introducing the Schrödinger wave equation and the chaotic mapping model. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0048] in:
[0049] Figure 1 It is a flow chart of the PI parameter dynamic identification method based on the improved quantum particle swarm algorithm;
[0050] Figure 2 It is a structural diagram of a PI parameter dynamic identification device based on an improved quantum particle swarm algorithm;
[0051] Figure 3 This is a structural block diagram of the terminal equipment. DETAILED DESCRIPTION
[0052] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0053] The terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices.
[0054] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0055] like Figure 1 As shown, Figure 1 The flowchart of the PI parameter dynamic identification method based on the improved quantum particle swarm algorithm in one embodiment is applied to the simulation model of the energy storage device. In the simulation model, the energy storage device converts DC power into AC power through an inverter and transmits it to the power grid. The controller in the inverter adopts a PI controller, which adopts a double closed-loop control strategy, in which the voltage outer loop is used to control the stability of the DC side voltage to ensure that the electric energy in the energy storage device can be stably output to the power grid. The current inner loop is used to control the stability of the output current to ensure that the active and reactive power can be adjusted as needed. By simulating and optimizing the PI parameters of the energy storage device, the performance of the controller can be significantly improved. However, the traditional PI parameter simulation method is often difficult to effectively cope with complex dynamic working conditions, which easily leads to a large deviation between the simulation optimization results and the actual operating effect.
[0056] The steps provided by the PI parameter dynamic identification method based on the improved quantum particle swarm algorithm in this embodiment include:
[0057] S101, constructing a particle swarm, and randomly initializing the positions of the particle swarm based on a set distribution probability.
[0058] Among them, each particle in the particle swarm corresponds to each group of PI parameters to be identified in the simulation model. When constructing a particle swarm, the following parameters need to be configured synchronously, including particle swarm dimension, particle swarm scale, upper limit of iteration number, and maximum and minimum values of optimization parameters. Here, particle swarm dimension refers to the number of dimensions of the particle position vector. In the PI parameter identification problem of this embodiment, the number of dimensions is set to 4, including 2 parameters of the voltage outer loop PI + 2 parameters of the current inner loop PI. The particle swarm scale refers to the total number of particles. The larger the scale, the higher the search accuracy may be, but the amount of calculation will also increase. The upper limit of iteration number refers to the maximum number of cycles executed by the algorithm, which is used to prevent infinite loops while ensuring search efficiency. The maximum and minimum values of the optimization parameters represent the search range of the PI parameters and define the upper and lower bounds of the particle position.
[0059] The distribution probability refers to the probability distribution of the initial position of the particle, such as uniform distribution, Gaussian distribution, etc., which determines the characteristics of the initial search space of the particle swarm. Randomly initializing the position of the particle swarm based on the set distribution probability can guide the particle swarm to focus more on the possible solution interval during the search process.
[0060] Optionally, the random initialization of the positions of the particle swarm based on the set distribution probability in S101 specifically includes the following steps:
[0061] A1. Set the distribution probability of the particle swarm, expressed as:
[0062]
[0063] In the above formula, F(Y) represents the cumulative probability of a particle appearing at position Y; Y represents the offset of the particle from the search center; L represents the control parameter that determines the search range of the particle;
[0064] A2. Based on the distribution probability, the position of the particle swarm is randomly generated by the reverse sampling method.
[0065] For example, using a random number generator r∈[0,1], by the formula:
[0066]
[0067] Determine the position Y of the particle, where the symbol ± indicates a random choice of positive or negative direction.
[0068] In this way, the probability of distribution can be concentrated in the search center, which helps the particle swarm to quickly find the initial search direction of the optimal solution and reduce the randomness of optimization. At the same time, the flexibility of the control parameter L enables the particle distribution to cover a wide search range and focus on the central area to avoid falling into the local optimum.
[0069] S102, using the Schrödinger wave equation to update the position of the particle swarm, simulating the simulation model based on the updated position of the particle swarm, calculating the fitness value of each particle in the particle swarm according to the current simulation result, sorting the fitness values and updating the current optimal position of the particles in the particle swarm according to the sorting result.
[0070] Among them, the Schrödinger wave equation regards the state of the particle as a probability wave, and the update of the particle position is determined by the wave function. In the global search phase, the Schrödinger wave equation is used to update the particle position in the entire search space based on the characteristics of quantum waves; in the local search phase, the particle fluctuation range gradually shrinks and concentrates near the current optimal position. This position update method introduces quantum wave characteristics, allowing particles to cover a wider space during the search process, which helps avoid falling into the local optimum.
[0071] Optionally, in S102, the position of the particle group is updated using the Schrödinger wave equation as follows:
[0072]
[0073]
[0074]
[0075] In the above formula, represents the next iteration position of the jth particle in the i-th dimension; represents the optimal position of the jth particle in the i-th dimension after combining the local and global information updates; β represents the preset expansion factor, which is used to adjust the position adjustment amplitude of the particle; Represents the current average optimal position of all particles; represents the current iteration position of the jth particle in the i-th dimension; u ij represents a uniform random number between 0 and 1, which controls the randomness of particle updates; k represents a random number that determines whether the particle moves closer to or farther away from the optimal point; Represents the randomly generated weight coefficient; Indicates the historical optimal position of the current particle; represents the global optimal position of all particles at present; M represents the size of particle swarm; represents the optimal position of the i-th particle in each dimension.
[0076] Furthermore, when using the Schrödinger wave equation to update the position of the particle swarm, the following steps can be performed to iteratively adjust the expansion factor, which can be expressed as:
[0077]
[0078] In the above formula, T maxRepresents the upper limit of the number of iterations, and t represents the current number of iterations. It can be understood that in the initial iteration, the β value is large and the step length is long, so the particles can quickly explore in a large range and avoid falling into the local optimum. As the number of iterations increases, the β value gradually decreases, the step length becomes shorter, and the particle search range is narrowed to improve the accuracy and detail accuracy of the optimization results. Such a dynamic step size adjustment mechanism can flexibly cope with search spaces of different complexities, making the optimization results more consistent with the actual working conditions.
[0079] Through simulation, the simulation results of each set of PI parameters, including three-phase current and voltage, can be obtained. Then, combined with the actual results, the control performance corresponding to each set of PI parameters can be evaluated. Optionally, the fitness value of each particle in the particle swarm is calculated based on the simulation results, expressed as:
[0080]
[0081] In the above formula, f fitness represents the fitness value; N represents the total number of data points; X n ′ represents the nth data point of the simulation model output; X n Represents the nth data point of the actual output of the energy storage device.
[0082] Then the fitness values are sorted, and the current optimal position is determined according to the sorting result (the position corresponding to the particle with the smallest or largest fitness value is selected, depending on the optimization goal. For example, the above formula selects the position corresponding to the particle with the smallest fitness value). If the fitness value of the new current optimal position is better than the fitness value of the previous current optimal position, it is updated to guide the next round of search, otherwise it is not updated.
[0083] Since the Schrödinger wave equation is used to update the position in this step, the particles can cover a wider search space, which reduces the risk of falling into the local optimum.
[0084] S103, using the chaotic mapping model to update the position of the particle swarm, simulating the simulation model based on the updated position of the particle swarm, calculating the fitness value of each particle in the particle swarm according to the current simulation result, sorting the fitness values and updating the current optimal position of the particles in the particle swarm according to the sorting result.
[0085] Among them, chaotic mapping is a deterministic nonlinear system whose output exhibits chaotic behavior under certain conditions. By introducing chaotic characteristics and adjusting the positions of particles nonlinearly, the search process has higher randomness and coverage, further avoiding the risk of falling into local optimality.
[0086] Optionally, using the chaotic mapping model to update the position of the particle swarm in S103 specifically includes the following steps:
[0087] B1. Iteratively generate chaotic sequences.
[0088] The chaotic sequence includes multiple chaotic disturbance values, and each chaotic disturbance value is generated as follows:
[0089]
[0090] In the above formula, represents the chaotic disturbance value generated by the d-th dimension at the t-th iteration; μ represents the preset chaotic factor; these values in the chaotic sequence are random but can cover the entire domain of space.
[0091] B2. Update the position of the particle swarm based on the chaotic sequence, expressed as:
[0092]
[0093]
[0094] in, represents the next iteration position of the jth particle in the i-th dimension; Indicates the current iteration position of the jth particle in the i-th dimension; represents the velocity of the jth particle in the i-th dimension; γ represents the chaotic perturbation weight; k represents the perturbation proportional factor; Represents the upper and lower bounds of the search range of the jth particle in the ith dimension; chaos(l) represents the value of the lth item in the chaotic sequence.
[0095] Furthermore, the following steps can be performed to update the position of the particle swarm using the chaotic mapping model: iteratively adjust the chaotic perturbation weight and the perturbation scale factor, which can be expressed as:
[0096]
[0097]
[0098] In the above formula, γ(t) represents the chaotic perturbation weight at the tth iteration; γ max represents the upper limit of chaotic perturbation weight; T max Represents the maximum number of iterations of the chaotic mapping model; γ min represents the lower limit of chaotic perturbation weight; k(t) represents the perturbation proportional factor at the tth iteration; k max represents the upper limit of the disturbance proportional factor; α represents the attenuation rate parameter, α>1.
[0099] That is to say, in the early stage, the influence of chaotic perturbation on the position of the particle swarm is enhanced by larger γ(t) and k(t), the search range is expanded, and it is avoided to fall into the local optimum. In the later stage, the values of γ(t) and k(t) are gradually reduced, so that the particle swarm is more focused on the local search and the convergence accuracy is improved. In this way, by dynamically adjusting the weight and perturbation factor, the search behavior of the particle swarm is optimized in real time during the iteration process, the invalid search is reduced, and the optimization efficiency is improved.
[0100] In addition, the principle of "simulating the simulation model based on the updated position of the particle swarm, calculating the fitness value of each particle in the particle swarm according to the current simulation result, sorting the fitness values and updating the current optimal position of the particles in the particle swarm according to the sorting result" in this step is basically the same as the principle in S102, so it will not be repeated.
[0101] S104, determine whether the current number of iterations has not reached the upper limit of the number of iterations, and whether the fitness value corresponding to the current optimal position has not reached the fitness threshold. If so, return to execute S102 and subsequent steps. If not, execute S105, output the current optimal position of the particle in the particle swarm as the identified PI parameter.
[0102] That is to say, in each iteration, the particle swarm updates its position and performs simulation, and the fitness function is used to evaluate the quality of the current optimal position. If the number of generations reaches the upper limit or the fitness value reaches the target threshold, the optimal parameters are output; otherwise, the iteration continues, the particle position is updated and the new fitness value is calculated until the exit condition is met.
[0103] The above-mentioned PI parameter dynamic identification method based on the improved quantum particle swarm algorithm constructs a particle swarm and performs random initialization under a set probability distribution, and uses the Schrödinger wave equation and chaos mapping model to update the position of the particle swarm, thereby dynamically optimizing the PI controller parameters. After each update, the fitness value is calculated by simulation and the optimal position of the particle is adjusted until the upper limit of the number of generations or the fitness threshold is met. This process can maintain high optimization efficiency and accuracy in the face of complex and dynamic working conditions by introducing the Schrödinger wave equation and chaos mapping model.
[0104] In one embodiment, Figure 2 As shown, a PI parameter dynamic identification device based on an improved quantum particle swarm algorithm is proposed, and the device includes:
[0105] The particle swarm construction and initialization module 201 is used to construct a particle swarm and randomly initialize the position of the particle swarm based on a set distribution probability; wherein each particle in the particle swarm corresponds to each group of PI parameters to be identified in the simulation model;
[0106] A first position updating module 202 is used to update the position of the particle swarm using the Schrödinger wave equation, simulate the simulation model based on the updated position of the particle swarm, calculate the fitness value of each particle in the particle swarm according to the current simulation result, sort the fitness values and update the current optimal position of the particles in the particle swarm according to the sorting result;
[0107] The second position updating module 203 is used to update the position of the particle swarm using the chaotic mapping model, simulate the simulation model based on the updated position of the particle swarm, calculate the fitness value of each particle in the particle swarm according to the current simulation result, sort the fitness values if they exist and update the current optimal position of the particles in the particle swarm according to the sorting result;
[0108] The loop judgment and output module 204 is used to return to the step of updating the position of the particle swarm using the Schrödinger wave equation and subsequent steps if the current number of iterations does not reach the upper limit of the number of iterations and the fitness value corresponding to the current optimal position does not reach the fitness threshold, until the current number of iterations reaches the upper limit of the number of generations and / or the fitness value corresponding to the current optimal position reaches the fitness threshold, and output the current optimal position of the particle in the particle swarm as the identified PI parameter.
[0109] Figure 3 FIG. 2 shows an internal structure diagram of a terminal device in an embodiment. Figure 3 As shown, the terminal device includes a processor, a memory and a network interface connected via a system bus. Among them, the memory includes a non-volatile storage medium and an internal memory. The non-volatile storage medium of the terminal device stores an operating system and may also store a computer program. When the computer program is executed by the processor, the processor can implement a PI parameter dynamic identification method based on an improved quantum particle swarm algorithm. The internal memory may also store a computer program. When the computer program is executed by the processor, the processor can execute a PI parameter dynamic identification method based on an improved quantum particle swarm algorithm. Those skilled in the art can understand that Figure 3 The structure shown in the figure is only a block diagram of a partial structure related to the scheme of the present application, and does not constitute a limitation on the terminal device to which the scheme of the present application is applied. The specific terminal device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0110] A computer-readable storage medium stores a computer program, which implements the following steps when executed by a processor: constructing a particle swarm and randomly initializing the position of the particle swarm based on a set distribution probability; wherein each particle in the particle swarm corresponds to each group of PI parameters to be identified in a simulation model; updating the position of the particle swarm using the Schrödinger wave equation, simulating the simulation model based on the updated position of the particle swarm, calculating the fitness value of each particle in the particle swarm according to the current simulation result, sorting the fitness values and updating the current optimal position of the particles in the particle swarm according to the sorting result; updating the particle swarm using a chaotic mapping model The position of the particle swarm is determined, and the simulation model is simulated based on the updated position of the particle swarm. The fitness value of each particle in the particle swarm is calculated according to the current simulation result, the fitness values are sorted, and the current optimal position of the particles in the particle swarm is updated according to the sorting result; if the current number of iterations does not reach the upper limit of the number of iterations, and the fitness value corresponding to the current optimal position does not reach the fitness threshold, then return to the step of updating the position of the particle swarm using the Schrödinger wave equation and subsequent steps until the current number of iterations reaches the upper limit of the number of generations, and / or the fitness value corresponding to the current optimal position reaches the fitness threshold, and the current optimal position of the particles in the particle swarm is output as the identified PI parameter.
[0111] A terminal device comprises a memory, a processor and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the following steps are implemented: constructing a particle swarm and randomly initializing the position of the particle swarm based on a set distribution probability; wherein each particle in the particle swarm corresponds to each group of PI parameters to be identified in a simulation model; updating the position of the particle swarm using the Schrödinger wave equation, simulating the simulation model based on the updated position of the particle swarm, calculating the fitness value of each particle in the particle swarm according to the current simulation result, sorting the fitness values and updating the current optimal position of the particles in the particle swarm according to the sorting result; using a chaotic map The model updates the position of the particle swarm, simulates the simulation model based on the updated position of the particle swarm, calculates the fitness value of each particle in the particle swarm according to the current simulation result, sorts the fitness values and updates the current optimal position of the particles in the particle swarm according to the sorting result; if the current number of iterations does not reach the upper limit of the number of iterations, and the fitness value corresponding to the current optimal position does not reach the fitness threshold, then return to execute the step of updating the position of the particle swarm using the Schrödinger wave equation and subsequent steps until the current number of iterations reaches the upper limit of the number of generations, and / or the fitness value corresponding to the current optimal position reaches the fitness threshold, and outputs the current optimal position of the particles in the particle swarm as the identified PI parameter.
[0112] It should be noted that the above-mentioned method, device, equipment and computer-readable storage medium for dynamic identification of PI parameters based on the improved quantum particle swarm algorithm belong to a general inventive concept, and the contents of the embodiments of the method, device, equipment and computer-readable storage medium for dynamic identification of PI parameters based on the improved quantum particle swarm algorithm can be applied to each other.
[0113] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the program can be stored in a non-volatile computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0114] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0115] The above embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several modifications and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A PI parameter dynamic identification method based on improved quantum particle swarm algorithm, characterized in that: A simulation model applied to an energy storage device, the method comprising: Constructing a particle swarm, and randomly initializing the position of the particle swarm based on a set distribution probability; wherein each particle in the particle swarm corresponds to each group of PI parameters to be identified in the simulation model; Using the Schrödinger wave equation to update the position of the particle swarm, simulating the simulation model based on the updated position of the particle swarm, calculating the fitness value of each particle in the particle swarm according to the current simulation result, sorting the fitness values and updating the current optimal position of the particles in the particle swarm according to the sorting result; Using a chaotic mapping model to update the position of the particle swarm, simulating the simulation model based on the updated position of the particle swarm, calculating the fitness value of each particle in the particle swarm according to the current simulation result, sorting the fitness values and updating the current optimal position of the particles in the particle swarm according to the sorting result; If the current number of iterations does not reach the upper limit of the number of iterations, and the fitness value corresponding to the current optimal position does not reach the fitness threshold, then return to the step of updating the position of the particle swarm using the Schrödinger wave equation and subsequent steps until the current number of iterations reaches the upper limit of the number of generations, and / or the fitness value corresponding to the current optimal position reaches the fitness threshold, and output the current optimal position of the particle in the particle swarm as the identified PI parameter.
2. The method according to claim 1, characterized in that The step of randomly initializing the position of the particle swarm based on the set distribution probability comprises: Set the distribution probability of the particle swarm, expressed as: In the above formula, F(Y) represents the cumulative probability of a particle appearing at position Y; Y represents the offset of the particle from the search center; L represents the control parameter that determines the search range of the particle; Based on the distribution probability, the position of the particle group is randomly generated by a reverse sampling method.
3. The method according to claim 1, characterized in that The use of the Schrödinger wave equation to update the position of the particle group is expressed as: In the above formula, represents the next iteration position of the jth particle in the i-th dimension; represents the optimal position of the jth particle in the i-th dimension after the current update combining local and global information; β represents the preset expansion factor; Represents the current average optimal position of all particles; represents the current iteration position of the jth particle in the i-th dimension; u ij represents a uniform random number between 0 and 1; k represents a random number that determines whether the particle moves toward or away from the optimal point; Represents the randomly generated weight coefficient; Indicates the historical optimal position of the current particle; represents the global optimal position of all particles at present; M represents the size of particle swarm; represents the optimal position of the i-th particle in each dimension.
4. The method according to claim 3, characterized in that The method further comprises: The dilation factor is iteratively adjusted, expressed as: In the above formula, T max represents the upper limit of the number of iterations, and t represents the current number of iterations.
5. The method according to claim 1, characterized in that The fitness value of each particle in the particle swarm is calculated according to the simulation results, which is expressed as: In the above formula, f fitness represents the fitness value; N represents the total number of data points; X n ′ represents the nth data point of the simulation model output; X n Represents the nth data point of the actual output of the energy storage device.
6. The method according to claim 1, characterized in that The method of updating the position of the particle swarm using a chaotic mapping model comprises: Iteratively generate a chaotic sequence; wherein the chaotic sequence includes multiple chaotic disturbance values, and each chaotic disturbance value is generated in the following manner: In the above formula, represents the chaotic disturbance value generated by the dth dimension at the tth iteration; μ represents the preset chaotic factor; The position of the particle swarm is updated based on the chaotic sequence, which is expressed as: in, represents the next iteration position of the jth particle in the i-th dimension; Indicates the current iteration position of the jth particle in the i-th dimension; represents the velocity of the jth particle in the i-th dimension; γ represents the chaotic perturbation weight; k represents the perturbation proportional factor; Represents the upper and lower bounds of the search range of the jth particle in the ith dimension; chaos(l) represents the value of the lth item in the chaotic sequence.
7. The method according to claim 6, characterized in that The method further comprises: The chaotic perturbation weight and the perturbation proportional factor are iteratively adjusted, which can be expressed as: In the above formula, γ(t) represents the chaotic perturbation weight at the tth iteration; γ max represents the upper limit of chaotic perturbation weight; T max Represents the maximum number of iterations of the chaotic mapping model; γ min represents the lower limit of chaotic perturbation weight; k(t) represents the perturbation proportional factor at the tth iteration; k max represents the upper limit of the disturbance proportional factor; α represents the attenuation rate parameter, α>1.
8. A PI parameter dynamic identification device based on an improved quantum particle swarm algorithm, characterized in that: The PI parameter dynamic identification device based on the improved quantum particle swarm algorithm includes: A particle swarm construction and initialization module, used to construct a particle swarm and randomly initialize the position of the particle swarm based on a set distribution probability; wherein each particle in the particle swarm corresponds to each group of PI parameters to be identified in the simulation model; A first position updating module, used for updating the position of the particle swarm using the Schrödinger wave equation, simulating the simulation model based on the updated position of the particle swarm, calculating the fitness value of each particle in the particle swarm according to the current simulation result, sorting the fitness values and updating the current optimal position of the particles in the particle swarm according to the sorting result; A second position updating module is used to update the position of the particle swarm using a chaotic mapping model, simulate the simulation model based on the updated position of the particle swarm, calculate the fitness value of each particle in the particle swarm according to the current simulation result, and sort the fitness values if they exist and update the current optimal position of the particles in the particle swarm according to the sorting result; The loop judgment and output module is used to return to the step of updating the position of the particle swarm using the Schrödinger wave equation and subsequent steps if the current number of iterations does not reach the upper limit of the number of iterations and the fitness value corresponding to the current optimal position does not reach the fitness threshold, until the current number of iterations reaches the upper limit of the number of generations and / or the fitness value corresponding to the current optimal position reaches the fitness threshold, and output the current optimal position of the particle in the particle swarm as the identified PI parameter.
9. A computer-readable storage medium, characterized in that: A computer program is stored, and when the computer program is executed by a processor, the processor is caused to perform the steps of the method according to any one of claims 1 to 7.
10. A terminal device, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the method according to any one of claims 1 to 7.