Parameter self-adaption control method for virtual synchronous generator in micro-grid
By adopting angular frequency prediction methods based on incremental learning and technical means of fuzzy radial basis neural network control in the microgrid, the problem of parameter mutation and limited application range of virtual synchronous generator parameter adjustment is solved, and effective suppression of frequency fluctuations in the microgrid system and improvement of system stability is achieved.
Patent Information
- Application Number
- CN202510043425.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-10
- Publication Date
- 2025-04-22
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the prior art, the parameter adjustment of virtual synchronous generators has problems such as parameter changes and limited application range, which is difficult to effectively suppress the fluctuations in the frequency and power of the microgrid system.
The angular frequency prediction method based on incremental learning and the fuzzy radial basis neural network control are adopted to adjust the rotational moment of inertia of the virtual synchronous generator by collecting the system's angular frequency and angular frequency changes to achieve parameter adaptation.
It effectively overcomes the shortcomings of the existing technology, improves the adaptability of the virtual synchronous generator, suppresses frequency fluctuations under the load changes of the microgrid, and improves the stability of the microgrid system.
Smart Images

Figure CN119864827A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of new energy control technology, and in particular to a control method for adaptively controlling parameters of a virtual synchronous generator in a microgrid. Background Art
[0002] As humans exploit non-renewable energy in large quantities, available fossil energy is gradually decreasing, and the use of fossil energy generates a large amount of carbon dioxide, which endangers environmental safety. Therefore, renewable clean energy will be more widely used in the future. However, the access of a large amount of distributed energy to the power grid through traditional power electronic equipment will reduce the inertia of the power grid and reduce the frequency stability of the power grid. Therefore, the virtual synchronous generator technology based on energy storage system has gradually attracted widespread attention.
[0003] Although the bang-bang algorithm mentioned in the existing literature adjusts the virtual inertia and effectively suppresses the fluctuation of the frequency and power of the microgrid system, the parameters of the algorithm are discretized, and the sudden change of the resulting parameters may cause new adverse effects. Other literature proposes fuzzy control to achieve parameter adaptation, but this method is an experience-based control algorithm. Different fuzzy rules and membership functions need to be adopted for different systems, and its application scope is limited. Summary of the invention
[0004] The purpose of the present invention is to solve the shortcomings of the prior art, and propose a control method for the adaptive parameters of virtual synchronous generators in microgrids, by collecting the system angular frequency and angular frequency change, using the angular frequency prediction method based on incremental learning, and adjusting the rotational inertia of the traditional virtual synchronous generator through fuzzy radial basis neural network control. This method can effectively overcome the defects of the prior art, improve the adaptive ability of the virtual synchronous generator, effectively suppress the frequency fluctuation under the load change of the microgrid, and improve the stability of the microgrid system.
[0005] In order to achieve the above object, the present invention adopts the following technical solutions:
[0006] A control method for parameter adaptation of a virtual synchronous generator in a microgrid comprises the following steps:
[0007] The main focus of the present invention is on the inertia parameters of the virtual synchronous generator. Therefore, in order to reduce the complexity of the system, the electromagnetic relationship between the rotor and the stator is not considered. At the same time, due to the particularity of the virtual synchronous generator, the microgrid system will not be affected by electromagnetic coupling like the traditional synchronous generator, so ignoring the electromagnetic relationship between the rotor and the stator can improve the stability of the system.
[0008] Based on the principle of traditional synchronous generator, the virtual synchronous generator is modeled. Based on the analysis of the virtual synchronous generator rotor motion equation, the moment of inertia and damping coefficient are introduced, and the moment of inertia parameters are adaptively adapted to stabilize the frequency fluctuation of the microgrid; the rotor mathematical model of the virtual synchronous generator is:
[0009]
[0010] Where J is the virtual inertia, D is the damping coefficient, P m is the mechanical power, P e is the electromagnetic power, ω is the actual angular frequency, ω o is the rated angular frequency, δ is the power angle, is the actual angular frequency change rate, is the power angle change rate;
[0011] In order to realize the primary frequency regulation process, a virtual speed regulator model is established based on active power-frequency droop control:
[0012]
[0013] In the formula, K f is the active power-frequency droop coefficient, P0 is the active power reference value;
[0014] Similarly, a virtual excitation regulator model based on reactive power-voltage droop control is established:
[0015]
[0016] In the formula, K u is the reactive power-voltage droop coefficient, E is the output voltage of the virtual synchronous generator, U0 is the reference voltage, Q and Q0 are the reactive power output value and reference value of the virtual synchronous generator respectively;
[0017] In order to improve the output voltage stability and enhance the system response speed, voltage and current dual closed-loop control is adopted;
[0018]
[0019] In the formula, K pc and K ic are the proportional and integral control coefficients of the inner current loop, K pv and K iv are the proportional and integral control coefficients of the voltage outer loop, and v d and v q are the d-axis and q-axis components of the virtual synchronous generator output reference voltage and actual output voltage, respectively. sd and i sqare the d-axis and q-axis components of the virtual synchronous generator stator current, and are the d and q axis components of the current reference, and is the control voltage of the dual closed-loop control output, C and L are the filter capacitor and filter inductor.
[0020] Preferably, in order to achieve accurate control of the parameters of the virtual synchronous generator, an angular frequency prediction method based on incremental learning is adopted. By sampling the current angular frequency and its rate of change, the angular frequency value at the next moment is estimated, and the prediction result is dynamically corrected through the prediction errors of the previous times. This method can pre-adjust the adaptive parameters by predicting the angular frequency changes, avoid the hysteresis of parameter adjustment, reduce the frequency fluctuation of the microgrid system, and ensure the stability of the system.
[0021] Preferably, the angular frequency prediction method based on incremental learning uses the current angular frequency change rate as the prediction direction, the prediction data sampling time interval as the prediction step size, and then based on the previous prediction error, by analyzing the influence of each error result, assigning its influence factor, i.e., weight, to compensate the result. The calculation formula is:
[0022]
[0023] in, is the prediction result, Δt is the prediction step size, and Δω is the error compensation.
[0024] Preferably, the error compensation in the angular frequency prediction method adopts a weight-based calculation method, fully considering the impact of each error, summing each error result based on the weight to obtain the final error correction value; the closer to the current error, the greater the weight, and conversely, the farther away from the current error, the smaller the weight, and the calculation formula is:
[0025] Δω=ξ1·Δω1+ξ2·Δω2+...+ξ i ·Δω i +...+ξ n ·Δω n
[0026] Among them, ξ i is the weight coefficient, whose value is Δω i is the prediction error from the current i prediction points, and its value is:
[0027]
[0028] Preferably, fuzzy radial basis function neural network control is used to sample the predicted angular frequency results, adjust the width of the radial basis function in real time based on fuzzy rules, and then obtain the appropriate moment of inertia J through the neural network algorithm to reduce the angular frequency fluctuations caused by load mutations and ensure the stability of the microgrid system.
[0029] Preferably, a fuzzy radial basis function neural network control is used, where the inputs are Δω and The output is J, so the input layer node is 2, the output layer node is 1, and the hidden layer node can be set to 5;
[0030] Using the Gaussian radial basis function as the transformation function of the hidden layer, the output of the i-th neuron in the hidden layer is:
[0031]
[0032] In the formula is the input vector of the input layer, is the center vector of the i-th neuron in the hidden layer, b i is the Gaussian function width vector, m is the number of neurons, then the output layer result is:
[0033] y=w1h1+…+w m h m
[0034] Where w1, w2, ..., w m is the weight of each neuron. In order to ensure that the output result is within a reasonable range and to ensure the smoothness of the result and to better apply it to the calculation of gradient descent, a sigmoid function is used to shrink the original result range from (-∞, +∞) to (0, 0.5). The formula is:
[0035]
[0036] Where u is the maximum value of the moment of inertia, which is set to 0.5 here;
[0037] The weight update uses the gradient descent method, and whether the weight is updated depends on the neural network performance function:
[0038]
[0039] When E(k)·E(k-1)=0, the weight is not updated, that is, dw=0. When E(k)·E(k-1)≠0, the weight is updated, dw=Δw il (k);
[0040] The weight update formula is:
[0041]
[0042] Where η is the learning rate, α is the inertia coefficient, because It is not convenient to solve directly, so it is converted, and the conversion formula is:
[0043]
[0044] Where i=1,2,...,5,l=1, so we can get:
[0045]
[0046] Preferably, fuzzy control is used to adjust the width vector of the Gaussian function to find a suitable width under different conditions:
[0047] When the system angular frequency deviation Δω becomes larger, or the angular frequency change rate When it gets bigger, b should be reduced i to increase the responsiveness of each neuron to frequency fluctuations;
[0048] When the system angular frequency deviation Δω becomes smaller, or the angular frequency change rate When it becomes smaller, b should be increased i The value of is used to reduce the output fluctuation of each neuron and improve the stability of the system;
[0049] Based on the above rules, the following fuzzy rule table is established:
[0050]
[0051] The fuzzy controller based on the above rules is used to correct the moment of inertia. In order to match the obtained target object with the specific physical quantity, it is also necessary to perform fuzzy processing on it. Based on the designed triangular membership function, the same quantitative target and domain as the input part are used, that is, {-1, 1}; this means that at a certain moment, the membership of the fuzzy variables corresponding to the input and output are consistent; based on this premise, the centroid method is used to calculate the quantized value of each output quantity. This method can accurately reflect the overall distribution of the fuzzy variables, thereby ensuring that the adjustment of the control parameters is more accurate and effective. The calculation formula is:
[0052]
[0053] Where M i It means that the output fuzzy set ΔJ is at a specific value x i The membership value of x i The degree of belonging to the fuzzy set, x i It is a specific value in the domain, representing a possible adjustment value of the output.
[0054] Compared with the prior art, the present invention has the following beneficial effects:
[0055] 1. The present invention collects the system angular frequency and angular frequency variation, uses an angular frequency prediction method based on incremental learning, and adjusts the rotational inertia of a traditional virtual synchronous generator through fuzzy radial basis function neural network control.
[0056] 2. The present invention can effectively overcome the defects of the prior art, improve the adaptive ability of the virtual synchronous generator, effectively suppress the frequency fluctuation under the load change of the microgrid, and improve the stability of the microgrid system. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] Figure 1 is a flow chart of the present invention;
[0058] Figure 2 It is a structural diagram of the microgrid of the present invention;
[0059] Figure 3 is a prediction error curve diagram of the present invention;
[0060] Figure 4 This is the fuzzy neural network control structure diagram of the present invention;
[0061] Figure 5 The output angular frequency variation curve diagram before and after the adaptive addition of the present invention;
[0062] Figure 6 This is a graph showing the output power variation before and after the adaptive addition of the present invention. DETAILED DESCRIPTION
[0063] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the accompanying drawings, so that those skilled in the art can better understand the advantages and features of the present invention, thereby making a clearer definition of the protection scope of the present invention. The embodiments described in the present invention are only a part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present invention.
[0064] like Figure 1 , Figure 2 As shown, a control method for parameter adaptation of a virtual synchronous generator in a microgrid comprises the following steps:
[0065] in is the predicted result, ω is the actual angular frequency, ω o is the rated angular frequency, Δt is the prediction duration, Δω is the error compensation, ξ i is the weight coefficient whose value is Δω iis the prediction error from the current i prediction points, h i is the output of the i-th neuron in the hidden layer, is the input vector of the input layer, is the center vector of the i-th neuron in the hidden layer, b i is the width vector of the Gaussian function, m is the number of neurons, w1,w2,...,w m is the weight of each neuron, u is the maximum moment of inertia, E(x) is the neural network performance function, η is the learning rate, α is the inertia coefficient, Δb is the fuzzy control result, M i It means that the output fuzzy set ΔJ is at a specific value x i The membership value of x i The degree of belonging to the fuzzy set, x i It is a specific value in the definition domain, representing the possible adjustment value of the output. The parameters of the virtual synchronous generator control system based on the photovoltaic-energy storage microgrid built on the MATLAB / Simulink simulation platform are shown in the following table:
[0066]
[0067] 1) First, based on the principle of traditional synchronous generator, the virtual synchronous generator is modeled. The present invention is mainly based on the analysis of the virtual synchronous generator rotor motion equation, by introducing the moment of inertia and damping coefficient, and realizing the adaptive moment of inertia parameters to stabilize the frequency fluctuation of the microgrid. Among them, the rotor mathematical model of the virtual synchronous generator is:
[0068]
[0069] Where J is the virtual inertia, D is the damping coefficient, P m is the mechanical power, P e is the electromagnetic power, ω is the actual angular frequency, ω o is the rated angular frequency, δ is the power angle, is the actual angular frequency change rate, is the power angle change rate.
[0070] Since the main focus of the present invention is on the inertia parameters of the virtual synchronous generator, the electromagnetic relationship between the rotor and the stator is not considered to reduce the complexity of the system. At the same time, due to the particularity of the virtual synchronous generator, its system will not be affected by electromagnetic coupling like the traditional synchronous generator, so ignoring the electromagnetic relationship between the rotor and the stator can improve the stability of the system.
[0071] In order to realize the primary frequency regulation process, a virtual speed regulator model is established based on active frequency droop control:
[0072]
[0073] In the formula, K f is the active frequency droop coefficient, and P0 is the active power reference value.
[0074] Similarly, a virtual excitation regulator model based on reactive power and voltage droop control is established:
[0075]
[0076] Where K u is the reactive voltage droop coefficient, E is the output voltage of the virtual synchronous generator, U0 is the reference voltage, Q and Q0 are the reactive power output value and reference value of the virtual synchronous generator respectively.
[0077] In order to improve the output voltage stability and enhance the system response speed, voltage and current dual closed-loop control is adopted.
[0078]
[0079] In the formula, K pc and K ic are the proportional and integral control coefficients of the inner current loop, K pv and K iv are the proportional and integral control coefficients of the voltage outer loop, and v d and v q are the d-axis and q-axis components of the virtual synchronous generator output reference voltage and actual output voltage, respectively. sd and i sq are the d-axis and q-axis components of the virtual synchronous generator stator current, and are the d and q axis components of the current reference, and is the control voltage of the dual closed-loop control output, C and L are the filter capacitor and filter inductor.
[0080] like Figure 3 , Figure 4 As shown in the figure, in order to achieve accurate control of the parameters of the virtual synchronous generator, the angular frequency prediction method based on incremental learning is first adopted. By sampling the current angular frequency and its rate of change, the angular frequency value at the next moment is estimated, and the prediction result is dynamically corrected through the prediction errors of the previous few times. This method can make adaptive parameter pre-adjustments by predicting the changes in angular frequency, avoid the hysteresis of parameter adjustment, reduce the frequency fluctuations of the microgrid system, and ensure system stability.
[0081] The angular frequency prediction method based on incremental learning adopted by the present invention uses the current angular frequency change rate as the prediction direction, the prediction data sampling interval as the prediction step size, and then based on the previous prediction error, the influence factor (i.e., weight) is assigned by analyzing the influence degree of each error result, and the result is compensated. The calculation formula is:
[0082]
[0083] The error compensation in the angular frequency prediction method adopts a weight-based calculation method, which fully considers the impact of each error, sums each error result based on the weight, and obtains the final error correction value. The closer to the current error, the greater the weight, and vice versa, the farther away from the current error, the smaller the weight. Its calculation formula is:
[0084] Δω=ξ1·Δω1+ξ2·Δω2+...+ξ i ·Δω i +...+ξ n ·Δω n
[0085]
[0086] The angular frequency prediction results show that under stable conditions, the prediction error does not exceed 0.01 rad. At 0.4s, the VSG output power reference changes from 50kW to 100kW, and the prediction error does not exceed 0.3 rad. The prediction results are relatively accurate.
[0087] like Figure 5 As shown in the figure, fuzzy radial basis function neural network control is used. By sampling the predicted angular frequency results, the width of the radial basis function is adjusted in real time based on fuzzy rules, and then the appropriate moment of inertia J is obtained through the neural network algorithm to reduce the angular frequency fluctuations caused by load mutations and ensure the stability of the microgrid system.
[0088] The fuzzy radial basis function neural network control structure used in the present invention has the inputs of Δω and The output is J, so the input layer node is 2, the output layer node is 1, and the hidden layer node can be set to 5.
[0089] Using the Gaussian radial basis function as the transformation function of the hidden layer, the output of the i-th neuron in the hidden layer is:
[0090]
[0091] The output layer result is:
[0092] y=w1h1+…+w m h m
[0093] In order to ensure that the output results are within a reasonable range, and to ensure the smoothness of the results and to better apply them to the calculation of gradient descent, a sigmoid function is used to shrink the original result range from (-∞, +∞) to (0, 0.5). The formula is:
[0094]
[0095] Where u is the maximum value of the moment of inertia, which is set to 0.5 here.
[0096] The weight update uses the gradient descent method. Whether the weight is updated depends on the neural network performance function:
[0097]
[0098] When E(k)·E(k-1)=0, the weight is not updated, that is, dw=0. When E(k)·E(k-1)≠0, the weight is updated, dw=Δw il (k).
[0099] The weight update formula is:
[0100]
[0101] because It is not convenient to solve directly, so it is converted, and the conversion formula is:
[0102]
[0103] Where i=1,2,...,5,l=1. So we can get:
[0104]
[0105] A fuzzy rule table is established and fuzzy control is used to adjust the width vector of the Gaussian function to find the appropriate width vector under different conditions:
[0106] When the system angular frequency deviation Δω becomes larger, or the angular frequency change rate When it gets bigger, b should be reduced i to increase the responsiveness of each neuron to frequency fluctuations.
[0107] When the system angular frequency deviation Δω becomes smaller, or the angular frequency change rate When it becomes smaller, b should be increased i value to reduce the output fluctuation of each neuron and improve the stability of the system.
[0108] Based on the above rules, the following fuzzy rule table is established:
[0109]
[0110]
[0111] The moment of inertia is corrected using a fuzzy controller based on the above rules. In order to match the target object with the specific physical quantity, it is also necessary to fuzzify it. Based on the designed triangular membership function, the same quantitative target and domain as the input part are adopted, that is, {-1, 1}. This means that at a certain moment, the membership of the fuzzy variables corresponding to the input and output is consistent. Based on this premise, the centroid method can be used to calculate the quantized value of each output quantity. This method can accurately reflect the overall distribution of the fuzzy variables, thereby ensuring that the adjustment of the control parameters is more accurate and effective. The calculation formula is:
[0112]
[0113] The angular frequency prediction results are as follows: Figure 3 As shown in the figure, under stable conditions, the prediction error does not exceed 0.01 rad. At 0.4s, the VSG output power reference changes from 50kW to 100kW, and the prediction error does not exceed 0.3 rad. The prediction result is relatively accurate.
[0114] like Figure 5 and Figure 6 As shown in the comparison diagram of simulation results, after adding parameter adaptation to the fuzzy neural network structure in the control method, compared with the virtual synchronous generator system without adaptation, the system convergence speed after adding adaptive parameters is faster and the fluctuation range is smaller. Under the condition that the VSG reference power suddenly changes from 50kW to 100kW at 0.4s, the angular frequency fluctuation range is only about 70% of the angular frequency fluctuation range before adding adaptation.
[0115] In summary, the present invention collects the system angular frequency and angular frequency variation, uses the angular frequency prediction method based on incremental learning, and adjusts the rotational inertia of the traditional virtual synchronous generator through fuzzy radial basis neural network control. This method can effectively overcome the defects of the prior art, improve the adaptive ability of the virtual synchronous generator, effectively suppress the frequency fluctuation under the load change of the microgrid, and improve the stability of the microgrid system.
[0116] The description and practice disclosed in the present invention are easy to think and understand for ordinary technicians in the technical field, and several improvements and modifications can be made without departing from the principles of the present invention. Therefore, modifications or improvements made without departing from the spirit of the present invention should also be regarded as the protection scope of the present invention.
Claims
1. A control method for adaptive parameters of virtual synchronous generators in microgrids, characterized in that: The steps include: Based on the analysis of the virtual synchronous generator rotor motion equation, the moment of inertia and damping coefficient are introduced, and the moment of inertia parameters are adaptively adapted to stabilize the frequency fluctuation of the microgrid. The rotor mathematical model of the virtual synchronous generator is: Where J is the virtual inertia, D is the damping coefficient, P m is the mechanical power, P e is the electromagnetic power, ω is the actual angular frequency, ω o is the rated angular frequency, δ is the power angle, is the actual angular frequency change rate, is the power angle change rate; In order to realize the primary frequency regulation process, a virtual speed regulator model is established based on active power-frequency droop control: In the formula, K f is the active power-frequency droop coefficient, P0 is the active power reference value; Similarly, a virtual excitation regulator model based on reactive power-voltage droop control is established: In the formula, K u is the reactive power-voltage droop coefficient, E is the output voltage of the virtual synchronous generator, U0 is the reference voltage, Q and Q0 are the reactive power output value and reference value of the virtual synchronous generator respectively; In order to improve the output voltage stability and enhance the system response speed, voltage and current dual closed-loop control is adopted; In the formula, K pc and K ic are the proportional and integral control coefficients of the inner current loop, K pv and K iv are the proportional and integral control coefficients of the voltage outer loop, and v d and v q are the d-axis and q-axis components of the virtual synchronous generator output reference voltage and actual output voltage, respectively. sd and i sq are the d-axis and q-axis components of the virtual synchronous generator stator current, and are the d and q axis components of the current reference, and is the control voltage of the dual closed-loop control output, C and L are the filter capacitor and filter inductor.
2. A control method for parameter adaptation of a virtual synchronous generator in a microgrid according to claim 1, characterized in that: In order to achieve precise control of the parameters of the virtual synchronous generator, an angular frequency prediction method based on incremental learning is adopted. By sampling the current angular frequency and its rate of change, the angular frequency value at the next moment is estimated, and the prediction result is dynamically corrected through the prediction errors of the previous times.
3. A control method for parameter adaptation of a virtual synchronous generator in a microgrid according to claim 2, characterized in that: The angular frequency prediction method based on incremental learning uses the current angular frequency change rate as the prediction direction and the prediction data sampling time interval as the prediction step size. Then, based on the previous prediction error, the influence factor, i.e., weight, is assigned by analyzing the influence of each error result to compensate the result. The calculation formula is: in, is the prediction result, Δt is the prediction step size, and Δω is the error compensation.
4. A control method for parameter adaptation of a virtual synchronous generator in a microgrid according to claim 3, characterized in that: The error compensation in the angular frequency prediction method adopts a weight-based calculation method, which fully considers the impact of each error, sums each error result based on the weight, and obtains the final error correction value; the closer to the current error, the greater the weight, and conversely, the farther away from the current error, the smaller the weight. The calculation formula is: Dω=ξ1·Dω1+ξ2·Dω2+...+ξ i ·See i +...+ξ n ·See n Among them, ξ i is the weight coefficient, whose value is Δω i is the prediction error from the current i prediction points, and its value is:
5. A control method for parameter adaptation of a virtual synchronous generator in a microgrid according to claim 4, characterized in that: Fuzzy radial basis function neural network control is used. By sampling the predicted angular frequency results, the width of the radial basis function is adjusted in real time based on fuzzy rules, and then the appropriate moment of inertia J is obtained through the neural network algorithm to reduce the angular frequency fluctuations caused by load mutations and ensure the stability of the microgrid system.
6. A control method for parameter adaptation of a virtual synchronous generator in a microgrid according to claim 5, characterized in that: The fuzzy radial basis function neural network control is used, where the inputs are Δω and The output is J, so the input layer node is 2, the output layer node is 1, and the hidden layer node can be set to 5; Using the Gaussian radial basis function as the transformation function of the hidden layer, the output of the i-th neuron in the hidden layer is: In the formula is the input vector of the input layer, is the center vector of the i-th neuron in the hidden layer, b i is the Gaussian function width vector, m is the number of neurons, then the output layer result is: y=w1h1+…+w m h m Where w1, w2, ..., w m is the weight of each neuron. In order to ensure that the output result is within the range and to ensure the smoothness of the result and to better apply it to the calculation of gradient descent, a sigmoid function is used to shrink the original result range from (-∞, +∞) to (0, 0.5). The formula is: Where u is the maximum value of the moment of inertia, which is set to 0.5 here; The weight update uses the gradient descent method, and whether the weight is updated depends on the neural network performance function: When E(k)·E(k-1)=0, the weight is not updated, that is, dw=0. When E(k)·E(k-1)≠0, the weight is updated, dw=Δw il (k); The weight update formula is: Where η is the learning rate, α is the inertia coefficient, because It is not convenient to solve directly, so it is converted, and the conversion formula is: Where i=1,2,...,5,l=1, so we can get:
7. A control method for parameter adaptation of a virtual synchronous generator in a microgrid according to claim 6, characterized in that: Use fuzzy control to adjust the width vector of the Gaussian function to find the appropriate width under different conditions: When the system angular frequency deviation Δω becomes larger, or the angular frequency change rate When it gets bigger, b should be reduced i to increase the responsiveness of each neuron to frequency fluctuations; When the system angular frequency deviation Δω becomes smaller, or the angular frequency change rate When it becomes smaller, b should be increased i The value of is used to reduce the output fluctuation of each neuron and improve the stability of the system; Based on the above rules, the following fuzzy rule table is established: The fuzzy controller based on the above rules is used to correct the moment of inertia. In order to match the obtained target object with the specific physical quantity, it is also necessary to perform fuzzy processing on it. Based on the designed triangular membership function, the same quantitative target and domain as the input part are used, that is, {-1, 1}; this means that at a certain moment, the membership of the fuzzy variables corresponding to the input and output are consistent; based on this premise, the centroid method is used to calculate the quantized value of each output quantity. This method can accurately reflect the overall distribution of the fuzzy variables, thereby ensuring that the adjustment of the control parameters is more accurate and effective. The calculation formula is: Where M i It means that the output fuzzy set ΔJ is at a specific value x i The membership value of x i The degree of belonging to the fuzzy set, x i It is a specific value in the domain, representing a possible adjustment value of the output.