VSG Model Parameter Identification Method Based on Improved Salp Swarm Algorithm
The improved PSO algorithm with simulated annealing and adaptive weights enhances VSG parameter identification, addressing inaccuracies in traditional methods and improving optimization accuracy and speed.
Patent Information
- Application Number
- CN202311391325.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-25
- Publication Date
- 2025-07-15
- Estimated Expiration
- 2043-10-25
AI Technical Summary
The existing VSG power control model parameter identification method has low accuracy, cannot reflect the actual unit characteristics, and there is a deviation in the least squares estimation under the condition of colored noise.
The improved squid group algorithm combined with simulated annealing method is used to identify VSG model parameters. By constructing error function and fitness value calculation, the leader and follower positions in the squid group algorithm are optimized, and the parameter identification accuracy and accuracy of optimal results are improved.
The accuracy of parameter identification and the convergence speed of the algorithm are improved, local optimal solutions are avoided, and global optimal solutions are obtained, which enhances the accuracy and reliability of VSG model parameter identification.
Smart Images

Figure CN118036642B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of power systems and their automation. Background Art
[0002] Under the background of the accelerating transformation of the global energy structure, new energy sources such as wind power generation and solar power generation have developed rapidly, and the installed capacity of new energy power generation has increased rapidly. Distributed power sources are connected to the power system through grid-connected inverters. However, traditional grid-connected inverters cannot provide inertia and damping support for the power system, which has a huge impact on the stable operation of the power system. The virtual synchronous generator technology (VSG) endows the grid-connected inverter with inertia support ability. However, in the actual application of VSG technology, problems such as the typification of power control parameters, low accuracy, and inability to reflect the characteristics of actual units are prominent. In view of the gray-box structure characteristics of the VSG system, system identification is an effective method to quantify the difference between design parameters and actual parameters.
[0003] Currently, for the identification of VSG power control model parameters, the least squares method is mainly used for parameter identification, that is, the discrete step response function is used to describe the system to be identified, and when the model noise is colored noise, the least squares estimation is biased and inaccurate. Summary of the Invention
[0004] Purpose of the Invention: To solve the problems existing in the above-mentioned prior art, the present invention provides a method for identifying VSG model parameters based on an improved salp swarm algorithm.
[0005] Technical Solution: The present invention provides a method for identifying VSG model parameters based on an improved salp swarm algorithm, which specifically includes the following steps:
[0006] Step 1: Construct a power control parameter identification model of VSG;
[0007] Step 2: Construct an error function according to the parameter identification model in Step 1;
[0008] Step 3: Calculate the fitness value based on the error function, and introduce simulated annealing into the salp swarm algorithm to obtain the optimal solution of the VSG model variables.
[0009] Further, the expression of the numerical model of the VSG power control model in Step 1 is:
[0010]
[0011] where, T s represents the sampling period, k represents the sampling point, kT s , (k + 1)T both represent moments, ΔP ref represents the command active power disturbance amount, ΔP actual active power disturbance amount, Δep The error between the commanded active power disturbance and the actual active power disturbance. Both x1 and x2 are state variables, and K e = ω0K s / D m , where K s is the synchronous power coefficient to be solved, and D m is the equivalent damping coefficient to be solved; T ps = D m / 2H m , H m is the equivalent inertia constant, and ω0 is the rated angular frequency.
[0012] Furthermore, the error function in step 2 is as follows:
[0013]
[0014] where D represents the total number of samples, and f g (ΔP ref (kT s )) is the transfer function, and its expression is:
[0015] f g [ΔP ref (kT s )] = ΔP(kT s ) - e m (kT s )
[0016] where e m (kT s ) represents the residual.
[0017] Furthermore, step 3 is specifically as follows:
[0018] Step 3.1: Initialize the population. Set the search space dimension to N, the number of salp swarms to D, then the size of the salp swarm is N*D; set the maximum number of iterations to D max , the initial temperature to T0, the minimum temperature to T min , and the temperature decay coefficient to k';
[0019] Step 3.2: Calculate the fitness value of each salp;
[0020] Step 3.3: Take the salp with the best fitness as the food, that is, the optimal solution of the current iteration; and determine the leader and followers;
[0021] Step 3.4: Update the positions of the leader and followers;
[0022] Step 3.5: Determine whether the current number of iterations is greater than or equal to 2 / 3D max, if so, go to step 3.6; otherwise, increment the iteration count by 1 and then go to step 3.2;
[0023] Step 3.6: Perturb the optimal solution obtained from the current iteration to get a perturbed solution, and substitute the optimal solution obtained from the iteration calculation and the perturbed solution into the error function respectively to calculate the difference ΔQ between the two error functions e , if ΔQ e ≤0, then update the optimal solution: take the perturbed solution as the optimal solution for the current iteration; otherwise, update the optimal solution with a probability of , where T represents the temperature of the current iteration; then go to step 3.7;
[0024] Step 3.7: Determine whether the current iteration count has reached the maximum iteration count. If so, go to step 3.8, increment the iteration count by 1, and then go to step 3.2;
[0025] Step 3.8: Determine whether T has reached the minimum temperature T min , if the minimum temperature T min has been reached, then output the optimal solution; otherwise, set the iteration count to 0, update the temperature, set T = k’T, and then go to step 3.2.
[0026] Furthermore, in step 3.4, the position of the leader is updated according to the following formula:
[0027]
[0028] where represents the t’-th iteration, j = 1, 2, …, N, represents the position of the leader in the j-th dimensional space at the t’-th iteration, represents the position of the leader in the j-th dimensional space at the (t’-1)-th iteration, F j represents the position of the food in the j-th dimensional space, r1 is a random number between [0, 2π], r2 is a random number between [0, 2], and r3 is a random number between [0, 1].
[0029] Furthermore, in step 3.4, the position of the follower is updated according to the following formula:
[0030]
[0031] where, represents the position of the i-th follower in the j-th dimensional space at the t’-th iteration, represents the position of the i-th follower in the j-th dimensional space at the (t’-1)-th iteration, and w1 and w2 are two adaptive weight coefficients, and their expressions are:
[0032]
[0033]
[0034] Among them, F t’,best represents the fitness value of the food at the t'-th iteration, and F t’,worst represents the fitness value with the lowest rank at the t'-th iteration. represents the fitness value of the (i - 1)-th follower in the j-th dimensional space at the t'-th iteration, and represents the fitness value of the i-th follower in the j-th dimensional space at the t'-th iteration.
[0035] Beneficial effects:
[0036] 1. Compared with the commonly used least squares method in the past, the present invention uses the salp swarm optimization algorithm for parameter identification, which can avoid directly using difference equations to describe the system, and the accuracy of parameter identification is improved.
[0037] 2. The present invention uses the sine-cosine search method to update the position of the leader in the salp swarm algorithm, which improves the convergence speed of the algorithm and is not prone to large fluctuations; and an adaptive weight factor is introduced to update the position of the followers in the salp swarm algorithm, which maximally avoids the blind following of the followers, resulting in a huge deviation in the optimization result, thereby increasing the accuracy of the optimization result of the algorithm.
[0038] 3. The present invention introduces the simulated annealing algorithm to perform simulated annealing on the food source position in the salp swarm algorithm, and jumps out of the local optimal solution with the characteristic of probability jump to obtain the global optimal solution, thereby improving the accuracy of the optimization result. Description of the drawings
[0039] Figure 1 is the flowchart of the method of the present invention.
[0040] Figure 2 is the design parameter verification method of VSG based on intelligent identification.
[0041] Figure 3 is the ideal VSG design flowchart.
[0042] Figure 4 is the single-phase equivalent circuit diagram of the VSG "quasi-steady state" third-order model.
[0043] Figure 5 is the parameter identification method of VSG based on intelligent optimization algorithm. Detailed implementation manners
[0044] The drawings constituting a part of the present invention are used to provide a further understanding of the present invention. The schematic embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention.
[0045] AsFigure 1 As shown in the figure, the technical solution adopted by the present invention is as follows:
[0046] Step 1: Construct a power control parameter identification model for the VSG; and construct an error function.
[0047] Step 2: Use the error function as the fitness function.
[0048] Step 3: Calculate the fitness value from the error function, and introduce simulated annealing in the salp swarm algorithm to obtain the optimal solution of the VSG model variables.
[0049] The specific modeling steps of Step 1 are as follows:
[0050] (1-1) As Figure 2 shown, the mechanism analysis of the VSG power control model can obtain the model structure, and only the model parameters are unknown. As Figure 3 shown, select the "quasi-steady state" third-order model of the VSG as the system-known model of the gray box model. The single-phase equivalent circuit of the "quasi-steady state" third-order model of the VSG is as Figure 4 shown, and the given system identification technical indexes are D m , K s . Establish the "quasi-steady state" third-order linearized model of the VSG:
[0051] The state equation of the VSG active power control is:
[0052]
[0053] where, δ is the power angle, ω0, ω, ω g , ω ref are the rated angular frequency, the VSG angular frequency, the grid voltage angular frequency, and the VSG reference angular frequency respectively; P ref and P are the VSG command active power and the output active power respectively; H and D are the inertia constant and the damping coefficient respectively.
[0054] The state equation of the VSG reactive power control is:
[0055]
[0056] where, Q f and Q are the reactive power output after filtering by the filter and the VSG output reactive power respectively; ω f is the filter cut-off frequency, ω f =1 / T f ; Q ref and E ref are the VSG command reactive power and the command voltage respectively, k q is the reactive power droop coefficient, and e d is the output voltage.
[0057] After taking the Laplace transform of equations (1) and (2), the power loop model is obtained as follows:
[0058]
[0059] where s is the complex parameter variable in the Laplace transform, also known as the complex frequency.
[0060] The derivation of the "quasi-steady state" third-order model neglects the dynamics of the internal voltage loop, current loop, and the electromagnetic transients of the transmission line, that is Therefore, if the third-order model satisfies the "quasi-steady state" assumption, then there is:
[0061]
[0062] where and e q = 0, that is X g = ω g L g ; where R g is the equivalent resistance of the power grid, I g is the input current of the power grid, is the voltage phasor of the VSG, E is the amplitude, ∠0 means the phase angle is 0, e d is 's direct-axis component, e q is 's quadrature-axis component, j is the imaginary symbol, U g ∠δ is the power grid voltage phasor, U g is the amplitude of the phasor, ∠δ is the phase angle of the phasor, L g is the equivalent inductance of the power grid.
[0063] The calculation formula for the VSG output power is:
[0064]
[0065] is to take 's conjugate, and Conj is the conjugate operator.
[0066] By combining equations (4) and (5), the algebraic expression for the VSG output power can be obtained as:
[0067]
[0068] In the formula, E = k q Q ref - k q Q f + E ref ; E represents the amplitude size, represents the phasor, k qis the coefficient before reactive power.
[0069] Linearize the "quasi-steady state" third-order nonlinear model of VSG at the steady-state operating point (E0, U g0 , δ0), where E0 is the amplitude of the VSG output voltage at the steady-state operating point, U g0 is the amplitude of the grid voltage at the steady-state operating point, and δ0 is the phase angle of the grid voltage at the steady-state operating point. The "quasi-steady state" third-order linearized model of VSG can be obtained as follows:
[0070]
[0071]
[0072] where s is the complex parameter variable in the Laplace transform, also known as the complex frequency; Δδ is the change in the grid voltage phase angle, Δω is the frequency change rate, and Δω g is the grid frequency change rate; ΔP ref is the disturbance of the VSG command active power, and Δω ref is the change in the reference frequency.
[0073] In the formula,
[0074] (1-2) Establish the state-space model of the VSG power control sampling system:
[0075] The low-frequency model structure of VSG can be obtained from the third-order linearized model as follows:
[0076]
[0077] In the formula, H m , D m , K s are the equivalent inertia constant, equivalent damping coefficient, and synchronous power coefficient of the system to be measured, respectively.
[0078] The state-space equation of the VSG power control sampling system is:
[0079]
[0080] ΔP(s) is the actual active power disturbance, and ΔP ref (s) is the command active power disturbance. x1 and x2 are the state variables 1 and 2, respectively, and are the derivatives of the state variables x1 and x2, respectively. T ps = D m / 2H m , K e = ω0K s / D m .
[0081] Solving Equation (10), we can obtain:
[0082]
[0083] τ represents the integration variable used to distinguish it from the time variable t.
[0084] (1 - 3) Establish the numerical model of the VSG power control sampling system:
[0085] Let t = kT s and t + 1 = (k + 1)T s Substitute them into Equation (11), and subtract the two obtained equations. k is defined as the sampling sequence, and different k values correspond to different moments. We can get the response in the interval [kT s , (k + 1)T s as:
[0086]
[0087] Since the sampling period T s is small and changes little in the integration interval [kT s , (k + 1)T s , a zero-order hold is added after the sampling switch, and we can obtain:
[0088] Δe p (t) = Δe p (kT s ), kT s ≤ t < (k + 1)T s (13)
[0089] Substitute Equation (13) into Equation (12), and we can obtain:
[0090]
[0091] Solving Equation (14), the structural expression of the numerical model of the VSG power control sampling system is:
[0092]
[0093] (1 - 4) Define the error index function and obtain the system identification parameters:
[0094] Let the VSG command power perturbation ΔP ref be the input, the output power change ΔP be the output, and f be the actual system transfer function. Then the input-output relationship of the VSG power control system is:
[0095] ΔP(t) = f[ΔP ref (t)] (16)
[0096] Let t = kTs , where \(k = 1, 2, 3, \cdots, D\), \(D\) is the number of sampling points. Substituting it into Equation (16), we can get:
[0097] \(\Delta P(kT s ) = f[\Delta P ref (kT s )] (17)
[0098] As Figure 5 shown, if \(f g is the transfer function of the estimation model, then adding the residual \(e m (kT s ) to the estimation model, we can get:
[0099] \(\Delta P(kT s ) = f g [\Delta P ref (kT s )] + e m (kT s ) (18)
[0100] Therefore, the error index function can be defined as:
[0101]
[0102] When \(Q e reaches the minimum value, the corresponding \(D m and \(K s are the results of parameter identification.
[0103] As shown in Figure 1, the specific steps of Step 3 are as follows:
[0104] S3-1: Initialize the algorithm parameters and population: Initialize the population, set the search space dimension as \(N\) (since two parameters need to be solved in this embodiment, let \(N = 2\)), the number of salp swarms is \(D\), then the scale of the salp swarm is \(N\times D\); set the maximum number of iterations as \(D max , the initial temperature as \(T_0\), the minimum temperature as \(T min , and the temperature attenuation coefficient as \(k'\).
[0105] S3-2: Calculate the fitness function value \(Q e of the salp swarm according to Equation (19), take the salp with the best fitness as the food, that is, the optimal solution of the current iteration; and determine the leader and followers.
[0106] S3-3: Call the first salp in the salp chain the leader, and the rest of the salps the followers. Update the leader according to the following formula:
[0107]
[0108] Among them, it represents the t'-th iteration, and j = 1, 2, …, N. It represents the position of the leader in the j-th dimensional space at the t'-th iteration. It represents the position of the leader in the j-th dimensional space at the (t'-1)-th iteration, F j It represents the position of the food in the j-th dimensional space. r1 is a random number between [0, 2π], r2 is a random number between [0, 2], and r3 is a random number between [0, 1].
[0109] S3-4: Introduce an adaptive weight factor w, and calculate the weight of each individual in the population according to its fitness value. Its expression is: It represents the fitness value of the i-th individual in the j-th dimensional space, F worst and F best respectively represent the fitness values of the worst individual and the best individual (food) in the iteration. Then, update the position of the follower according to the following formula;
[0110]
[0111] Among them, It represents the position of the i-th follower in the j-th dimensional space at the t'-th iteration. It represents the position of the i-th follower in the j-th dimensional space at the (t'-1)-th iteration. w1 and w2 are two adaptive weight coefficients, and their expressions are:
[0112]
[0113]
[0114] Among them, F t’,best It represents the fitness value of the food at the t'-th iteration, F t’,worst It represents the fitness value of the last one in the sorting at the t'-th iteration. It represents the fitness value of the (i-1)-th follower in the j-th dimensional space at the t'-th iteration. It represents the fitness value of the i-th follower in the j-th dimensional space at the t'-th iteration.
[0115] S3-5: Judge whether the current iteration number D i is greater than 2 / 3D max If it is greater than 2 / 3D max then go to step S3-6; otherwise, increase the iteration number by 1 and go to step S3-2.
[0116] S3-6: Perturb the optimal solution obtained from the current iterative calculation to get a perturbed solution, substitute the optimal solution obtained from the iterative calculation and the perturbed solution into the error function respectively, and calculate the difference ΔQ between the two error functions. e , if ΔQ e ≤0, then update the optimal solution: use the perturbed solution as the optimal solution for the current iteration; otherwise, update the optimal solution with a probability of , where T represents the temperature of the current iteration; then go to step S3-2.
[0117] S3-7: Determine whether the current iteration number has reached the maximum iteration number. If so, go to step 3.8, increment the iteration number by 1, and then go to step S3-2.
[0118] S3-8: Determine whether T has reached the minimum temperature T min . If it has reached the minimum temperature T min , then output the optimal solution; otherwise, set the iteration number to 0, update the temperature, let T = k’T, and then go to step S3-2.
[0119] In addition, it should be noted that, in the above specific embodiments, the various specific technical features described can be combined in any suitable manner without contradiction. To avoid unnecessary repetition, the present invention does not further describe various possible combination methods.
Claims
1. A method for identifying the parameters of the VSG model based on an improved salp swarm algorithm, characterized in that Specifically, it includes the following steps: Step 1: Construct a power control parameter identification model for VSG; Step 2: Construct an error function based on the parameter identification model in Step 1; Step 3: Calculate the fitness value based on the error function, introduce simulated annealing into the salp swarm algorithm, so as to obtain the optimal solution of the VSG model variables The expression of the numerical model of the VSG power control model in Step 1 is: Among them, T s represents the sampling period, k represents the sampling point, and kT s , (k + 1)T both represent moments, and ΔP ref represents the disturbance of the commanded active power, ΔP represents the actual disturbance of the active power, and Δe p represents the error between the disturbance of the commanded active power and the actual disturbance of the active power. Both x1 and x2 are state variables, and K e = ω0K s / D m , where K s is the synchronous power coefficient to be solved, and D m is the equivalent damping coefficient to be solved; T ps = D m / 2H m , where H m is the equivalent inertia constant, and ω0 is the rated angular frequency; The error function in Step 2 is: where D represents the total number of samplings, f g (ΔP ref (kT s )) is the transfer function, and the expression is: f g [ΔP ref (kT s )] = ΔP(kT s ) - e m (kT s ) where e m (kT s ) represents the residual quantity; Step 3 is specifically: Step 3.1: Initialize the population. Set the search space dimension as N and the number of salp swarm population as D, then the scale of the salp swarm population is N * D; set the maximum number of iterations as D max , the initial temperature is T0, and the minimum temperature is T min , and the temperature attenuation coefficient is k'; Step 3.2: Calculate the fitness value of each salp; Step 3.3: Take the salp with the optimal fitness as food, that is, the optimal solution of the current iteration; and determine the leader and followers; Step 3.4: Update the positions of the leader and followers; Step 3.5: Determine whether the current iteration count is greater than or equal to 2 / 3D max , if so, go to Step 3.6; otherwise, increment the iteration count by 1 and then go to Step 3.2; Step 3.6: Perturb the optimal solution obtained from the current iterative calculation to obtain a perturbed solution, and substitute the optimal solution obtained from the iterative calculation and the perturbed solution into the error function respectively to calculate the difference ΔQ between the two error functions e , if ΔQ e ≤0, then update the optimal solution: take the perturbed solution as the optimal solution for the current iteration; otherwise update the optimal solution with a probability of , where T represents the temperature of the current iteration; then go to Step 3.7; Step 3.7: Judge whether the current iteration number reaches the maximum iteration number. If so, go to Step 3.8, increment the iteration number by 1, and then go to Step 3.2; Step 3.8: Determine whether T has reached the minimum temperature T min , if the minimum temperature T is reached min , then output the optimal solution; otherwise, set the iteration count to 0, update the temperature, let T = k’T, and then go to Step 3.
2.
2. The method for identifying VSG model parameters based on the improved salp swarm algorithm according to claim 1, characterized in that In Step 3.4, the position of the leader is updated according to the following formula: where, it represents the t'-th iteration, and j = 1, 2, …, N, represents the position of the leader in the j-th dimensional space at the t'-th iteration, represents the position of the leader in the j-th dimensional space at the (t'-1)-th iteration, F j represents the position of the food in the j-th dimensional space, r1 is a random number between [0, 2π], r2 is a random number between [0, 2], and r3 is a random number between [0, 1].
3. The method for identifying the parameters of the VSG model based on the improved salp swarm algorithm according to claim 1, wherein In Step 3.4, the position of the follower is updated according to the following formula: Among them, represents the position of the $i$-th follower in the $j$-th dimension at the $t'$-th iteration, represents the position of the $i$-th follower in the $j$-th dimension at the $(t' - 1)$-th iteration, and $w_1$ and $w_2$ are two adaptive weight coefficients, and their expressions are as follows: Among them, F t’,best represents the fitness value of the food at the t'-th iteration, and F t’,worst represents the fitness value ranked last at the t'-th iteration, represents the fitness value of the (i - 1)-th follower in the j-th dimensional space at the t'-th iteration, represents the fitness value of the i-th follower in the j-th dimensional space at the t'-th iteration.
Citation Information
Patent Citations
VSG parameter quantification method under different control strategies based on particle swarm algorithm
CN112329323A
VSG parameter adaptive control method based on SSA-ELM
CN116683538A