Disclosure of Invention
The invention provides a microgrid energy management method based on an NARMA-L2 model, aiming at solving the problem of modeling errors of a distributed power supply, the NARMA-L2 model is used for replacing a power supply dynamic mathematical model, and based on a containment concept, a data set is generated to train an artificial neural network in the NARMA-L2 model, and a proper nonlinear expression is generated; and aiming at the used model, a gradient descent search algorithm is adopted to give a proper reference value, so that the rapid and accurate model removal control is realized, and the control targets of reactive load equalization and rapid voltage recovery are achieved.
The invention adopts the following technical scheme for solving the technical problems:
the invention provides a microgrid energy management method based on a NARMA-L2 model, which comprises the following steps:
step 10, establishing a relational expression between distributed power supply output and control signal input by utilizing a NARMA-L2 model;
step 20, based on a containment control concept, taking reactive power sharing as a target to obtain a data set of control signal input and voltage output;
step 30, training a neural network used for representing a complex nonlinear function in the relational expression established in the step 10 by using the data set obtained in the step 20, and fitting the nonlinear output dynamic characteristic of the distributed power supply under the condition of uniform reactive power, so as to obtain a relational expression between the trained distributed power supply output and the trained control signal input; constructing a distributed power supply controller based on NARMA-L2 according to a relation between the trained distributed power supply output and the trained control signal input;
and step 40, providing a target output voltage reference value for the distributed power supply controller constructed in the step 30 by using a gradient descent search algorithm, and finishing the reactive power cooperative control of the microgrid.
As a further optimization scheme of the microgrid energy management method based on the NARMA-L2 model, in step 10, the NARMA-L2 model is used for replacing a distributed power supply dynamic mathematical model, a complex nonlinear function part in a distributed power supply system is approximately replaced through an artificial neural network, and the relational expression between the output of the distributed power supply and the input of a control signal is as follows:
y(k+d)=f[y(k),y(k-1),…,y(k-n+1),u(k),u(k-1),u(k-z+1)]+g[y(k),y(k-1),…,y(k-n+1),u(k),u(k-1),u(k-z+1)]·u(k) (1)
wherein u (k) represents the input of the distributed power supply control signal at the k moment, y (k) represents the output voltage signal of the distributed power supply at the k moment, y (k + d) represents the output voltage signal of the distributed power supply at the k + d moment, and f and g represent complex nonlinear functions of the nonlinear part in the distributed power generation system; collecting the distributed power supply output at the k-n +1 moment in total, wherein y (k-n +1) represents the distributed power supply output at the (k-n +1) th moment; and c, acquiring the control signal input at the k-z +1 moment, wherein u (k-z +1) is the control signal input at the (k-z +1) th moment.
As a further optimization scheme of the microgrid energy management method based on the NARMA-L2 model, the specific process of the step 20 is as follows:
step 201, for the distributed control micro-grid topology, converting the cooperative target into neighbor information error tracking:
in the formula, e
iRepresenting the error between the i-th distributed power supply node output voltage and a reference value, y
iRepresents the output voltage of the ith distributed power supply node, and j belongs to N
iIndicating that the jth node is a neighbor node of the ith node, N
iRepresents a set formed by all neighbor nodes of the ith distributed power node, a
ijRepresenting adjacency matrices in a distributed power system
The value of (i) th row and (j) th column in (1), g
iRepresenting the holdoff gain, y, of the ith distributed power node
jIndicating the output voltage value, y, of the jth node in communication topology with the ith node
0Represents the output voltage value of the pinning node, i.e., the reference value;
step 202, to guarantee error eiConverging to 0, and selecting the control signal input u according to the following formula under the condition that the control target is reactive load sharingi:
In the formula, Q
0Representing a reference reactive load, Q
iIndicating that the ith node outputs reactive power, omega
iIndicating whether the ith node has been pulledIn the preparation method, the raw materials are mixed,
representing the degree of coupling between the nodes;
step 203, replacing the reactive power in the formula (3) with the output voltage according to the droop control characteristic of the distributed power supply, namely the relational expression between the output voltage and the reactive power, wherein the control signal input expression is changed into:
wherein n isQiRepresenting the reactive droop coefficient, y, of the ith node0Representing the value of the output voltage of the holddown node, i.e. the reference value, u0A control signal input representing a holdover node; on the basis of the formula (4), determining corresponding control signal input by giving different distributed power supply outputs, and further forming a data set [ y ] of the control signal input and the voltage outputi,ui]。
As a further optimization scheme of the microgrid energy management method based on the NARMA-L2 model, the specific process of step 30 is as follows: from the resulting data set y in step 203i,ui]A complex non-linear function f in the relation is established for step 10]、g[*]Training an artificial neural network to replace f [. X [ ]],g[*]And on the basis of the NARMA-L2-based distributed power supply controller; the distributed power controller is a specific implementation of equation (1), and provides control signal inputs u (k) corresponding to different target voltage outputs.
As a further optimization scheme of the microgrid energy management method based on the NARMA-L2 model, the specific process of step 40 is as follows:
step 401, setting a reference value of target output voltage of the distributed power supply as yr(k + d) finding an expression of a target output voltage reference value for targeting reactive power sharing in step 2, and providing a reference value for the distributed power controller constructed in step 30; providing a target voltage output reference value by adopting a gradient descent search algorithmA generator:
wherein j | (i, j) ∈ DGDenotes that the ith, j distributed power node is a neighbor node, DGThe method is a set formed by combining all neighbor nodes in the distributed power system; j (y)i) Represents the average value of the sum of squares of the reactive power differences output by the ith node and the neighboring nodes, QjThe output reactive power of the jth node is represented, and m represents that the ith distributed power supply node has m neighbor nodes;
step 402, according to equation (5), J (y)i) When the minimum value exists, namely the difference between the reactive power output of all the distributed power supplies is minimum, the aim of sharing the reactive power in the step 2 is achieved; to find J (y)i) Minimum time distributed power supply target output voltage reference value yr(k + d) performing the following loop until convergence;
(7) formula (I) is expressed as finding the smallest J (y)
i) Value, constantly iterating y
iA, denotes the search step size,
represents J (y)
i) For y
iDerivative, temp, representing the current cycle y
iWith the convergence condition set to two cycles y
iThe variation is less than or equal to a preset value.
As a further optimization scheme of the microgrid energy management method based on the NARMA-L2 model, the preset value is 0.001.
Compared with the prior art, the invention adopting the technical scheme has the following technical effects:
according to the method, a NARMA-L2 model is used for replacing a dynamic mathematical model of the distributed power supply, so that the modeling control of the microgrid is realized, and the control speed and precision are improved; and then, by utilizing the control of the drag, generating a data set of an input control signal and a voltage output signal by taking reactive power equalization and voltage rapid recovery as targets, and training an artificial neural network used for representing a complex nonlinear function in an expression so as to achieve a good fitting effect. And finally, giving a reference value generator by adopting a gradient descent search algorithm to finish the quick stabilization of the microgrid.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described in detail with reference to the accompanying drawings and specific embodiments.
The system in the invention refers to a distributed power system, and the nodes refer to distributed power nodes.
As shown in fig. 1, the topology of the stream microgrid according to the embodiment of the present invention is shown in fig. 2. The method comprises the following steps:
step 10, establishing a relational expression between distributed power supply output and control signal input by utilizing a NARMA-L2 model;
step 20, based on a containment control concept, taking reactive power sharing as a target to obtain a data set of control signal input and voltage output;
step 30, training a neural network used for representing a complex nonlinear function in the relational expression established in the step 10 by using the data set obtained in the step 20, and fitting the nonlinear output dynamic characteristic of the distributed power supply under the condition of uniform reactive power, so as to obtain a relational expression between the trained distributed power supply output and the trained control signal input; constructing a distributed power supply controller based on NARMA-L2 according to a relation between the trained distributed power supply output and the trained control signal input;
and step 40, providing a target output voltage reference value for the distributed power supply controller constructed in the step 30 by using a gradient descent search algorithm, and finishing the reactive power cooperative control of the microgrid.
As a further optimization scheme of the microgrid energy management method based on the NARMA-L2 model, in step 10, the NARMA-L2 model is used for replacing a distributed power supply dynamic mathematical model, a complex nonlinear function part in a distributed power supply system is approximately replaced through an artificial neural network, and the relational expression between the output of the distributed power supply and the input of a control signal is as follows:
y(k+d)=f[y(k),y(k-1),…,y(k-n+1),u(k),u(k-1),u(k-z+1)]+g[y(k),y(k-1),…,y(k-n+1),u(k),u(k-1),u(k-z+1)]·u(k) (1)
wherein u (k) represents the input of the distributed power supply control signal at the k moment, y (k) represents the output voltage signal of the distributed power supply at the k moment, y (k + d) represents the output voltage signal of the distributed power supply at the k + d moment, and f and g represent complex nonlinear functions of the nonlinear part in the distributed power generation system; collecting the distributed power supply output at the k-n +1 moment in total, wherein y (k-n +1) represents the distributed power supply output at the (k-n +1) th moment; and c, acquiring the control signal input at the k-z +1 moment, wherein u (k-z +1) is the control signal input at the (k-z +1) th moment.
As a further optimization scheme of the microgrid energy management method based on the NARMA-L2 model, the specific process of the step 20 is as follows:
step 201, for the distributed control micro-grid topology, converting the cooperative target into neighbor information error tracking:
in the formula, e
iRepresenting the error between the i-th distributed power supply node output voltage and a reference value, y
iRepresents the output voltage of the ith distributed power supply node, and j belongs to N
iIndicating that the jth node is a neighbor node of the ith node, N
iRepresents a set formed by all neighbor nodes of the ith distributed power node, a
ijRepresenting adjacency matrices in a distributed power system
The value of (i) th row and (j) th column in (1), g
iRepresenting the holdoff gain, y, of the ith distributed power node
jIndicating the output voltage value, y, of the jth node in communication topology with the ith node
0Represents the output voltage value of the pinning node, i.e., the reference value;
step 202, to guarantee error eiConverging to 0, and selecting the control signal input u according to the following formula under the condition that the control target is reactive load sharingi:
In the formula, Q
0Representing a reference reactive load, Q
iIndicating that the ith node outputs reactive power, omega
iIndicating whether the ith node has been pinned,
representing the degree of coupling between the nodes;
step 203, replacing the reactive power in the formula (3) with the output voltage according to the droop control characteristic of the distributed power supply, namely the relational expression between the output voltage and the reactive power, wherein the control signal input expression is changed into:
wherein n isQiRepresenting the reactive droop coefficient, y, of the ith node0Representing the value of the output voltage of the holddown node, i.e. the referenceValue u0A control signal input representing a holdover node; on the basis of the formula (4), determining corresponding control signal input by giving different distributed power supply outputs, and further forming a data set [ y ] of the control signal input and the voltage outputi,ui]。
As a further optimization scheme of the microgrid energy management method based on the NARMA-L2 model, the specific process of step 30 is as follows: from the resulting data set y in step 203i,ui]A complex non-linear function f in the relation is established for step 10]、g[*]Training an artificial neural network to replace f [. X [ ]],g[*]And on the basis of the NARMA-L2-based distributed power supply controller; the distributed power controller is a specific implementation of equation (1), and provides control signal inputs u (k) corresponding to different target voltage outputs.
As a further optimization scheme of the microgrid energy management method based on the NARMA-L2 model, the specific process of step 40 is as follows:
step 401, setting a reference value of target output voltage of the distributed power supply as yr(k + d) finding an expression of a target output voltage reference value for targeting reactive power sharing in step 2, and providing a reference value for the distributed power controller constructed in step 30; a generator for providing a target voltage output reference value by adopting a gradient descent search algorithm:
wherein j | (i, j) ∈ DGDenotes that the ith, j distributed power node is a neighbor node, DGThe method is a set formed by combining all neighbor nodes in the distributed power system; j (y)i) Represents the average value of the sum of squares of the reactive power differences output by the ith node and the neighboring nodes, QjThe output reactive power of the jth node is represented, and m represents that the ith distributed power supply node has m neighbor nodes;
step 402, according to equation (5), J (y)i) When the minimum value exists, all distributed power supplies output reactive powerThe difference between the two is minimum, and the aim of taking reactive power sharing as the step 2 is achieved; to find J (y)i) Minimum time distributed power supply target output voltage reference value yr(k + d) performing the following loop until convergence;
(7) formula (I) is expressed as finding the smallest J (y)
i) Value, constantly iterating y
iA, denotes the search step size,
represents J (y)
i) For y
iDerivative, temp, representing the current cycle y
iWith the convergence condition set to two cycles y
iThe value change is less than or equal to a preset value, which can be 0.001.
According to the method provided by the embodiment of the invention, the NAMRA-L2 model is used for replacing a distributed power supply dynamic mathematical model, so that the model removal control of the micro-grid is realized. And meanwhile, a training data set is generated by using containment control, so that the convergence and stability of the micro-grid system are ensured, and finally, a reference value is generated by using a gradient descent search algorithm based on the generated de-modeling controller, so that the system is quickly converged.
An example is illustrated below.
An independent alternating-current microgrid structure is shown in fig. 2, microgrid energy management is carried out on the microgrid, a communication topology of the microgrid is shown in fig. 3, and relevant parameters are shown in table 1
TABLE 1 System parameters
The application effect of the micro-grid energy management under two conditions is given below
Case 1: sudden increase in load
In this case, the coupling gain c is 4, the microgrid operates in an island mode, the simulation starts at t 0, the control strategy starts at t 0.5s, and the active load of 40kW and the reactive load of 20kVA are added inside the system at t 2 s.
The step length alpha of the gradient descent search is 0.02, the strategy execution interval is 0.1s, and the convergence condition is that the reactive power difference between the adjacent nodes is less than 100 Var.
Fig. 4 (a) shows a reactive power output change process of each distributed power supply. In fig. 4 (a), the system using the NARAMA-L2 controller can achieve reactive sharing, and the system can respond quickly when the reactive load in the system suddenly increases. The balance of reactive power distribution of the system can be ensured, and reactive power circulation is reduced. Obviously, the system can be converged within 1 s.
Fig. 4 (b) shows the voltage change process of each distributed power supply in the case of a sudden load increase, and DG1 is assumed to be a holddown node. It can be seen that even with increased load, the remaining distributed supply voltage in the system does not drop below the reference voltage. That is, the pinning node sets a voltage limit that the voltage output of all DGs will remain greater than. In the power supply range, the system does not have the voltage collapse problem.
Case 2: power supply break in system
In this case, the coupling gain c is 4, the microgrid operates in an island mode, the simulation starts at t 0, and the control strategy starts at t 0.5 s. The DG3 power supply was disconnected at t-2 s, and the rest of the setup was the same as in case 1.
As shown in fig. 5 (a), after the DG3 is disconnected, the internal load of the system is taken by the rest of the distributed power supply. The voltages of the other three power sources should be reduced accordingly according to the droop control characteristics of the power generation. The voltage is stable due to the presence of the pinning node. The rest voltage is changed within a reasonable range and does not exceed the limit value, so that the quality of the electric energy is reduced.
Fig. 5 (b) shows a reactive power output state change process of the distributed power supply, and even if DG3 is disconnected, the remaining distributed power generation still can achieve the objective of reactive power balance, achieve stability of the power supply, and reduce the influence of reactive circulating current.
The above description is only for the specific embodiment of the present invention, but the scope of the present invention is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present invention are included in the scope of the present invention.