A model predictive control-based secondary control method, device and storage medium

CN122533104APending Publication Date: 2026-08-07DONGHUA UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
DONGHUA UNIV
Filing Date
2026-07-06
Publication Date
2026-08-07

AI Technical Summary

Technical Problem

[0006]本发明的目的在于克服现有技术中的不足,提供一种基于模型预测控制的微电网二次控制方法、装置和存储介质,解决基于传统比例积分控制的二次控制方法难以抵御网络攻击问题,提高二次控制的准确性和容错性能

Benefits of technology

[0036]本发明的基于模型预测控制的二次控制方法,各台分布式发电单元分别采用模型预测控制,实时计算各台分布式发电单元一次控制导致的频率与电压偏差的偏差程度,基于实时计算的各台分布式发电单元的偏差程度对应输出各台分布式发电单元实时的最优控制向量增量,对应得到各台分布式发电单元实时的最优控制向量,对各台分布式发电单元一次控制导致的频率和电压偏差进行实时补偿。这种基于实时偏差对未来状态进行预测,且带有约束的模型预测控制,在二次规划问题的求解过程中能够对虚假数据注入的本地测量值进行校正,得到最优控制向量增量,相比较以实时累积测量偏差为基准,无法预测未来状态,且没有约束限制的传统比例积分控制,本发明的基于模型预测控制的二次控制方法,能够解决基于传统比例积分控制的二次控制方法难以抵御网络攻击问题,提高二次控制的准确性和容错性能。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122533104A_ABST
    Figure CN122533104A_ABST
Patent Text Reader

Abstract

The application discloses a secondary control method and device based on model prediction control and a storage medium, and belongs to the technical field of micro-grid control. The method comprises the following steps: based on local measurement values of each distributed power generation unit at a current time and a pre-constructed prediction model, the deviation degree of frequency and voltage deviation caused by primary control of each distributed power generation unit is calculated respectively; based on the deviation degree of each distributed power generation unit at the current time, a constrained quadratic programming problem is constructed and solved respectively, and an optimal control vector increment corresponding to each distributed power generation unit is output; through the optimal control vector increment of each distributed power generation unit at the current time, an optimal control vector corresponding to each distributed power generation unit is obtained, the frequency and voltage deviation caused by the primary control of each distributed power generation unit is compensated respectively, and local measurement values of each distributed power generation unit at a next time are waited to be acquired. The application can solve the problem that the secondary control method based on traditional proportional integral control is difficult to resist network attacks.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of microgrid control technology, specifically relating to a secondary control method, device, and storage medium based on model predictive control. Background Technology

[0002] To ensure the stability of microgrids during islanded operation, hierarchical control architectures are widely used in these systems. Hierarchical control architectures typically include primary control and secondary control. Primary control employs droop control, simulating the power-frequency characteristics of a traditional synchronous generator to achieve frequency and voltage stability for each individual inverter and communication-free active power distribution among parallel units. However, the power distribution caused by droop control often results in frequency and voltage deviations. The purpose of secondary control is to generate frequency and voltage compensation signals to eliminate the steady-state frequency and voltage deviations caused by droop characteristics in primary control. Traditional secondary control often employs centralized or distributed control based on proportional-integral (PI) control.

[0003] However, PI controllers are essentially reactive controllers, and their parameters are typically tuned for specific operating conditions. When faced with changes in system parameters, large disturbances, and especially cyberattacks, their response speed, stability, and robustness are often insufficient. Furthermore, while the control architecture of secondary control can be distributed, enabling coordination and synchronization among distributed nodes in the network system, it may make it more vulnerable to spoofed data injection attacks. When one node is attacked, it can affect the safety and stability of the entire power system.

[0004] False Data Injection (FDIA) attacks are a typical cyber threat targeting microgrid systems. Attackers infiltrate sensor or communication networks to maliciously inject forged information into measurement data streams, thereby compromising the data integrity of the distributed communication network system. These attacks are highly covert because they often subtly alter measurement values ​​without compromising data communication integrity, thus circumventing traditional anomaly detection mechanisms. Once the false data is received by the control system, it will lead to control decisions based on erroneous information. When a microgrid is connected to the grid, hackers can inject false signals, causing changes in the frequency or voltage of secondary control compensation, leading to secondary control failure, resulting in frequency drift, voltage instability, or power distribution imbalance. In severe cases, this can cause the microgrid's operating condition to deteriorate or even collapse. Therefore, FDIA attacks are considered a significant challenge to the secure operation of smart grids, and ensuring the security of system nodes is of paramount importance.

[0005] When faced with a false data injection attack, the secondary control method based on traditional proportional-integral control uses the real-time accumulated measurement deviation as the output benchmark for the integral compensation term. The integral stage will continuously accumulate the erroneous measurement values ​​after being tampered with by the false data injection attack, and will be unable to identify abnormal measurement data. The tampered false erroneous measurement values ​​will continue to mislead the integral compensation quantity and cause it to continuously deviate from the reasonable operating range of the controller output of each distributed generation unit, eventually causing microgrid system oscillation or even instability. Summary of the Invention

[0006] The purpose of this invention is to overcome the shortcomings of the prior art and provide a microgrid secondary control method, device and storage medium based on model predictive control, which solves the problem that the secondary control method based on traditional proportional-integral control is difficult to resist network attacks, and improves the accuracy and fault tolerance of secondary control.

[0007] To solve the above-mentioned technical problems, the present invention is implemented using the following technical solution:

[0008] In a first aspect, the present invention provides a secondary control method based on model predictive control, comprising: acquiring local measurement values ​​of each distributed generation unit in a distributed microgrid at the current moment; the local measurement values ​​include frequency, voltage, active power, and reactive power; calculating the degree of frequency and voltage deviation caused by the primary control of each distributed generation unit based on the local measurement values ​​of each distributed generation unit at the current moment and a pre-built predictive model; the degree of deviation of the distributed generation unit at the current moment includes: output variable, consistency error, and control vector increment; the output variable represents the theoretical deviation between the local measurement value and the rated value or set value, and the consistency error represents the difference between the output variable and the output of its neighboring distributed generation unit obtained through communication. The deviation of the variables, the control vector increment represents the deviation of the control vector at the current time from the previous time; the control vector includes frequency compensation and voltage compensation; based on the deviation degree of each distributed generation unit at the current time, a constrained quadratic programming problem is constructed and solved respectively, and the optimal control vector increment of each distributed generation unit at the current time is output; the optimal control vector increment includes the optimal frequency compensation increment and the optimal voltage compensation increment; through the optimal control vector increment of each distributed generation unit at the current time, the optimal control vector at the current time is obtained, and the frequency and voltage deviations caused by the primary control of each distributed generation unit are compensated respectively, and the local measurement values ​​of each distributed generation unit at the next time are awaited.

[0009] The aforementioned model predictive control-based secondary control method uses a discrete state model as the predictive model. Based on the local measurements of the distributed generation unit at the current moment and the pre-built predictive model, the output variables of the distributed generation unit at the current moment are calculated, including: acquiring the local measurements of the distributed generation unit and its corresponding rated or setpoint values; calculating the difference between each local measurement value and its corresponding rated or setpoint value; using the differences between each local measurement value and its corresponding rated or setpoint value to form the system state at the current moment; the system state at each moment includes frequency difference, voltage difference, active power difference, and reactive power difference; inputting the system state at the current moment into the pre-built discrete state model, and calculating the output variables at the current moment; the discrete state model is obtained by discretizing a continuous state model constructed based on the differential equations of a first-order inertial system.

[0010] The aforementioned model predictive control-based secondary control method constructs a continuous state model based on the first-order inertial system differential equations, and then discretizes the continuous state model to obtain a discrete state model. This includes: constructing a continuous state differential equation for the frequency difference based on the first-order inertial system differential equation for the frequency output of the distributed generation unit and the frequency droop control equation after secondary control; constructing a continuous state differential equation for the voltage difference based on the first-order inertial system differential equation for the voltage output of the distributed generation unit and the voltage droop control equation after secondary control; constructing a continuous state differential equation for the active power difference based on the first-order inertial system differential equation for the active power output of the distributed generation unit and the frequency droop control equation after secondary control; constructing a continuous state differential equation for the reactive power difference based on the first-order inertial system differential equation for the reactive power output of the distributed generation unit and the voltage droop control equation after secondary control; constructing a continuous state model based on the continuous state differential equations for the frequency difference, voltage difference, active power difference, and reactive power; and discretizing the continuous state model according to the zero-order hold assumption to obtain a discrete state model.

[0011] The aforementioned model predictive control-based quadratic control method, according to the first... The continuous state differential equations for the frequency difference, voltage difference, active power difference, and reactive power of the distributed generation units are used to obtain the corresponding discrete state models, including: based on the... The frequency difference, voltage difference, active power difference, and reactive power of the distributed generation units form a corresponding set of continuous state differential equations. The continuous state differential equations of the distributed generation unit are as follows:

[0012] ,

[0013] In the formula, For the first Frequency difference of distributed generation units The derivative with respect to time; For the first Voltage difference of distributed generation units The derivative with respect to time; For the first Active power difference of distributed generation units in Taiwan The derivative with respect to time; For the first reactive power difference of distributed generation units in Taiwan The derivative with respect to time; This is the preset active power time constant; This is the preset reactive power time constant; It is the preset number Active power droop factor of distributed generation unit; It is the preset number The reactive power droop factor of each distributed generation unit; For the first Frequency compensation amount of distributed generation units; For the first Voltage compensation amount of the distributed generation unit; according to the first The continuous state differential equations of the distributed generation unit are used to construct the corresponding continuous state model. The continuous state model of the distributed generation unit is as follows:

[0014] ,

[0015] In the formula, For the first System status of distributed generation units The derivative with respect to time; For the first The state coefficient matrix of a distributed generation unit in a continuous system; For the first Control coefficient matrix of distributed generation units in a continuous system; For the first Control vector of the distributed generation unit; For the first The output system status of the distributed generation unit in the continuous system; For the first The identity matrix of distributed generation units in a continuous system;

[0016] ; ; This is a transpose operation;

[0017] ; ;

[0018] ; ; will the first The continuous state model of the distributed generation unit is discretized to obtain the corresponding discrete state model. Taiwan distributed generation unit in The discrete state model at time t is: ,

[0019] In the formula, For the first Taiwan distributed generation unit in The system state at any given moment; For the first The state coefficient matrix of a distributed generation unit in a discrete system; For the first Taiwan distributed generation unit in The system state at any given moment; For the first The control coefficient matrix of a distributed generation unit in a discrete system; For the first Taiwan distributed generation unit in Control vector at time; For the first Taiwan distributed generation unit in The output system state of a time-discrete system; For the first The identity matrix of the distributed generation unit in the discrete system; where, the first State coefficient matrix of distributed generation unit in discrete system The calculation formula is: , No. Control coefficient matrix of distributed generation unit in discrete system The calculation formula is: , Sampling period At a certain point in time, Represents the natural constant.

[0020] The aforementioned model predictive control-based secondary control method, wherein the step of inputting the current system state into a pre-constructed discrete state model and calculating the current output variable includes: inputting the current system state into the pre-constructed discrete state model to obtain the current output system state; calculating the reliability of the active power difference and reactive power difference in the current output system state to obtain the corresponding active power reliability factor and reactive power reliability factor; weighting the active power reliability factor and reactive power reliability factor in the current output system state with the active power difference and reactive power difference to obtain the current weighted active power difference and reactive power difference; and normalizing the frequency difference and voltage difference in the output system state, as well as the current weighted active power difference and reactive power difference, and outputting the current output variable.

[0021] No. Taiwan distributed generation unit in Output variables at time 1 for:

[0022] ,

[0023] In the formula, For the first Taiwan distributed generation unit in The frequency difference in the output variables at any given time; For the first Taiwan distributed generation unit in The frequency difference in the output system state at any given time; The rated frequency; For the first Taiwan distributed generation unit in The voltage difference in the output variables at any given time; For the first Taiwan distributed generation unit in The voltage difference in the output system state at any given time; Rated voltage; For the first Taiwan distributed generation unit in The difference in active power in the output variables at any given time; For the first Taiwan distributed generation unit in The reliability factor of active power at any given time; For the first Taiwan distributed generation unit in The difference in active power in the output system state at any given time; For the first The rated active power of the distributed generation unit; For the first Taiwan distributed generation unit in The reactive power difference in the output variables at any given time; For the first Taiwan distributed generation unit in Reactive power reliability factor at any given time; For the first Taiwan distributed generation unit in The reactive power difference in the output system state at any given time; For the first The rated reactive power of the distributed generation unit; For transpose operation; the first Taiwan distributed generation unit in Active power confidence factor at time The calculation formula is: In the formula, The preset active power difference sensitivity coefficient; the first Taiwan distributed generation unit in Reactive power reliability factor at time The calculation formula is: In the formula, This is the preset reactive power difference sensitivity coefficient.

[0024] The aforementioned model predictive control-based secondary control method calculates the control vector increment of the distributed generation unit at the current time based on the local measurements of the distributed generation unit and the pre-built predictive model, including: the first... Taiwan distributed generation unit in Control vector increment at time 1 The calculation formula is: In the formula, For the first Taiwan distributed generation unit in Control vector at time; For the first Taiwan distributed generation unit in Control vector at time; In the formula, For the first Taiwan distributed generation unit in Frequency compensation amount at any given moment; For the first Taiwan distributed generation unit in Voltage compensation amount at any given time; In the formula, For the first Taiwan distributed generation unit in Frequency compensation amount at any given moment; For the first Taiwan distributed generation unit in Voltage compensation amount at any given time.

[0025] The aforementioned model predictive control-based secondary control method calculates the consistency error of the distributed generation unit at the current moment, including: each distributed generation unit communicates unidirectionally with only one neighboring distributed generation unit to receive the output variables of its neighboring distributed generation unit; it obtains the output variables of the distributed generation unit at the current moment, as well as the output variables of its neighboring distributed generation unit received through communication; the output variables of the neighboring distributed generation unit at the current moment are: obtained by using the increment of the optimal control vector of the neighboring distributed generation unit at the previous moment to obtain the optimal control vector of the previous moment, after compensating for the frequency and voltage deviations caused by the primary control of the neighboring distributed generation unit, and then calculating the output variables based on the local measurement values ​​of the neighboring distributed generation unit at the current moment; the difference between the two output variables is calculated to obtain the consistency error of the distributed generation unit at the current moment.

[0026] The aforementioned model predictive control-based quadratic control method, the first Taiwan distributed generation unit in The constrained quadratic programming problem at time step is: minimize the first... Taiwan distributed generation unit in Objective function of model predictive control at time step , No. Taiwan distributed generation unit in Objective function of model predictive control at time step The calculation formula is:

[0027] ,

[0028] The corresponding constraints are:

[0029] ,

[0030] ,

[0031] ,

[0032] In the formula, This is the preset prediction time domain; The prediction time number within the prediction time domain; For the first Taiwan distributed generation unit in Output variables at time 1 For the Taiwan's distributed generation units in the future The output variables predicted at each time step; For the first The weight matrix of the output variables of the distributed generation unit; For the first Distributed generation unit neighboring distributed generation units exist Output variables at time 1 For neighboring distributed generation units future The output variables predicted at each time step; For the first The weight matrix of consistency error of distributed generation units; This is the preset control time domain; To control the control time sequence number within the control time domain; For the first Taiwan distributed generation unit in Control vector increment at time 1 For the Taiwan's distributed generation units in the future The increment of the control vector for time-mapping; For the first The weight matrix of the control vector increment of the distributed generation unit; , and This refers to weighted square norm operations; This is the lower limit of the output variables of a single distributed generation unit as preset; This is the upper limit of the output variables of a single distributed generation unit (DGU). This is the lower limit of the preset control vector for a single distributed generation unit; This is the upper limit of the control vector for a single distributed generation unit (DGU). This is the lower limit of the preset control vector increment for a single distributed generation unit; This is the upper limit of the control vector increment for a single distributed generation unit.

[0033] Secondly, the present invention provides a secondary control device based on model predictive control, which executes the method described in the first aspect, comprising: a measurement value acquisition module, a deviation calculation module, a control quantity acquisition module, and a compensation execution module; the measurement value acquisition module is used to acquire the local measurement values ​​of each distributed generation unit in the distributed microgrid at the current moment; the measurement values ​​include frequency, voltage, active power, and reactive power; the deviation calculation module is used to input the local measurement values ​​of each distributed generation unit at the current moment into a pre-built predictive model, and calculate the degree of deviation of frequency and voltage caused by the primary control of each distributed generation unit; the degree of deviation of the distributed generation unit at the current moment includes: output variable, consistency error, and control vector increment; the output variable represents the theoretical deviation between the local measurement value and the rated value or set value, and the consistency error represents the theoretical deviation of the output variable from the rated value or set value. The control vector increment represents the deviation between the output variables of the current distributed generation units and the output variables of their neighboring distributed generation units, obtained through communication. The control vector increment includes frequency compensation and voltage compensation. The control quantity acquisition module is used to construct and solve constrained quadratic programming problems based on the deviation degree of each distributed generation unit at the current time, and output the optimal control vector increment of each distributed generation unit at the current time. The optimal control vector increment includes the optimal frequency compensation increment and the optimal voltage compensation increment. The compensation execution module is used to obtain the optimal control vector at the current time through the optimal control vector increment of each distributed generation unit, compensate for the frequency and voltage deviations caused by the first control of each distributed generation unit, and wait to obtain the local measurement values ​​of each distributed generation unit at the next time.

[0034] Thirdly, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method described in the first aspect.

[0035] Compared with the prior art, the beneficial effects achieved by the present invention are as follows:

[0036] This invention presents a secondary control method based on model predictive control (MMDC). Each distributed generation unit (DRG) employs MMDC to calculate the degree of frequency and voltage deviation caused by the primary control of each DRG in real time. Based on the real-time calculated deviation degree, the incremental value of the optimal control vector for each DRG is output, thus obtaining the real-time optimal control vector for each DRG. This provides real-time compensation for the frequency and voltage deviations caused by the primary control of each DRG. This constrained MMDC, which predicts future states based on real-time deviations, can correct for spurious data injection into local measurements during the solution of quadratic programming problems, obtaining the optimal control vector increment. Compared to traditional proportional-integral (PI) control, which uses real-time accumulated measurement deviations as a benchmark, cannot predict future states, and lacks constraints, this MMDC-based secondary control method solves the problem of traditional PI control-based secondary control methods being vulnerable to cyberattacks, improving the accuracy and fault tolerance of secondary control.

[0037] The model predictive control-based secondary control method of the present invention designs a method that can characterize the degree of frequency and voltage deviation caused by the primary control of each distributed unit, and constructs a discrete state model that can adapt to model predictive control. This enables the model predictive control-based secondary control method to accurately match the actual compensation needs of the distributed microgrid and perform more accurate secondary control.

[0038] The frequency difference calculated based on the frequency and the rated frequency directly reflects the degree of frequency deviation caused by primary control, and the voltage difference calculated based on the voltage and the rated voltage directly reflects the degree of voltage deviation caused by primary control. This invention, in addition to frequency and voltage differences, also introduces active power differences calculated based on active power and active power setpoints, and reactive power differences calculated based on reactive power and reactive power setpoints. By using frequency and active power differences to characterize the frequency deviation caused by primary control based on the mutually influencing physical coupling relationship between frequency and active power, the comprehensiveness and accuracy of the frequency deviation characterization can be improved. Similarly, by using voltage and reactive power differences to characterize the voltage deviation caused by primary control based on the mutually influencing physical coupling relationship between voltage and reactive power, the comprehensiveness and accuracy of the voltage deviation characterization can be improved. Ultimately, the deviation degree designed in this invention, as input to the quadratic programming problem, can provide a reliable data foundation for model predictive control, enabling the model predictive control-based secondary control method to accurately match the actual compensation needs of distributed microgrids and perform more accurate secondary control.

[0039] To improve the stability of the secondary control method based on model predictive control in this invention, the invention also designs a calculation method for active power reliability factor and reactive power reliability factor, and adjusts the magnitude of active power deviation and reactive power deviation in the output variables in real time. In microgrid secondary control, based on the differences in measurement principles and calculation paths, active power and reactive power are less reliable measurement values ​​compared to frequency and voltage. When the active power difference and / or reactive power difference in the output system state are large, that is, when the deviation between active power and active power setpoint is large and / or the deviation between reactive power and reactive power setpoint is large, the values ​​of active power deviation and / or reactive power deviation in the output variables are reduced. This makes the solution of the secondary programming problem more focused on the frequency difference and voltage difference, and solves a smoother optimal control vector increment, thereby avoiding drastic changes in the optimal control vector increment due to the active power deviation and / or reactive power deviation approaching the corresponding constraint conditions. Attached Figure Description

[0040] Figure 1 This is a schematic flowchart of a secondary control method based on model predictive control according to Embodiment 1 of the present invention;

[0041] Figure 2 This is a schematic diagram of the frequency change of the secondary control output of each distributed generation unit in Embodiment 1 of the present invention using a secondary control method based on traditional PI control.

[0042] Figure 3 This is a schematic diagram of the frequency change of the secondary control output of each distributed generation unit in Embodiment 1 of the present invention using a secondary control method based on model predictive control.

[0043] Figure 4 This is a schematic diagram of the voltage change of the secondary control output of each distributed generation unit in Embodiment 1 of the present invention using a secondary control method based on traditional PI control.

[0044] Figure 5 This is a schematic diagram of the voltage change of the secondary control output of each distributed generation unit in Embodiment 1 of the present invention under the secondary control method based on model predictive control.

[0045] Figure 6 This is a schematic diagram of the active power change of each distributed generation unit in Embodiment 1 of the present invention under secondary control using a secondary control method based on traditional PI control.

[0046] Figure 7 This is a schematic diagram showing the change in active power output of each distributed generation unit in Embodiment 1 of the present invention using a secondary control method based on model predictive control for secondary control.

[0047] Figure 8 This is a schematic diagram of the reactive power change of each distributed generation unit in Embodiment 1 of the present invention under secondary control using a secondary control method based on traditional PI control.

[0048] Figure 9 This is a schematic diagram of the reactive power change of each distributed generation unit in Embodiment 1 of the present invention under secondary control by a secondary control method based on model predictive control. Detailed Implementation

[0049] The technical solution of the present invention will be described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the embodiments and specific features in the embodiments are detailed descriptions of the technical solution of the present application, rather than limitations thereof. In the absence of conflict, the embodiments and technical features in the embodiments can be combined with each other.

[0050] In this article, the term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. Additionally, the character " / " in this article generally indicates that the preceding and following related objects have an "or" relationship.

[0051] The present invention will be further illustrated below with reference to the accompanying drawings and specific embodiments. It should be understood that these embodiments are for illustrative purposes only and are not intended to limit the scope of the invention. After reading this invention, any modifications of the invention in various equivalent forms by those skilled in the art will fall within the scope defined by the appended claims.

[0052] Example 1:

[0053] This embodiment introduces a secondary control method based on model predictive control, such as... Figure 1 As shown, it includes:

[0054] S1: Obtain the local measurement values ​​of each distributed generation unit in the distributed microgrid at the current moment; the local measurement values ​​include frequency, voltage, active power and reactive power;

[0055] S2: Input the local measurement values ​​of each distributed generation unit at the current moment into the pre-built prediction model, and calculate the degree of frequency and voltage deviation caused by the primary control of each distributed generation unit. The degree of deviation of the distributed generation unit at the current moment includes: output variable, consistency error, and control vector increment. The output variable represents the theoretical deviation between the local measurement value and the rated value or set value. The consistency error represents the deviation between the output variable and the output variable of its neighboring distributed generation unit obtained through communication. The control vector increment represents the deviation between the control vector at the current moment and the control vector at the previous moment. The control vector includes frequency compensation and voltage compensation.

[0056] S3: Based on the deviation of each distributed generation unit at the current moment, construct and solve a constrained quadratic programming problem, and output the optimal control vector increment of each distributed generation unit at the current moment; the optimal control vector increment includes the optimal frequency compensation increment and the optimal voltage compensation increment.

[0057] S4: By using the optimal control vector increment of each distributed generation unit at the current moment, the optimal control vector at the current moment is obtained, and the frequency and voltage deviations caused by the primary control of each distributed generation unit are compensated respectively. Then, wait to obtain the local measurement values ​​of each distributed generation unit at the next moment.

[0058] To better explain the model predictive control-based secondary control method in this embodiment, the construction and implementation process of the method are described in detail below.

[0059] A distributed microgrid comprises multiple distributed generation units, each of which achieves autonomous power allocation and voltage / frequency regulation without interconnection communication through droop control. In this embodiment, a distributed microgrid consisting of four distributed generation units is used as an example to further introduce a secondary control method based on model predictive control.

[0060] No. The frequency droop control equation for the distributed generation unit is:

[0061] (1)

[0062] No. The voltage droop control equation for the distributed generation unit is:

[0063] (2)

[0064] In the formula, For the first In this embodiment, the frequency output by the distributed generation unit is... The value range is from 1 to 4; The rated frequency is the no-load frequency at which the microgrid system is expected to operate; the standard value for the power grid is 50Hz. It is the preset number Active power droop factor of distributed generation units in Taiwan It is the frequency change caused by the change in unit power; Indicates the first The active power output of the distributed generation unit. The active power is measured and calculated from the output of the LC filter of the distributed generation unit. For the first The active power setting value of the distributed generation unit in Taiwan. It is the first The distributed generation units are adapted to the local load of the microgrid to achieve the ideal active power distribution. In this embodiment, the rated active power of the four distributed generation units is the same, and the local load that the distributed microgrid needs to bear is 60kW. Therefore, under the ideal state of achieving power distribution, the active power setting value of each distributed generation unit is the same, which is 15. For the first The voltage output by each distributed generation unit; Rated voltage, This is the no-load voltage that the microgrid system is expected to operate at. It is the preset number Reactive power droop factor of each distributed generation unit It is the voltage change caused by a unit change in reactive power; Indicates the first The reactive power output of each distributed generation unit The reactive power is measured and calculated from the output of the LC filter of the distributed generation unit. For the first In this embodiment, the reactive power setting value of each distributed generation unit is the same, which is 0.

[0065] By the The droop characteristic equation of the distributed generation unit shows that the first When a distributed generation unit provides active and reactive power to a load, it will cause the first The frequency output of the distributed generation unit Deviation from rated frequency ,Voltage Deviation from rated voltage To compensate for this frequency and voltage deviation, secondary control of both frequency and voltage is required.

[0066] After secondary control The frequency droop control equation for the distributed generation unit is:

[0067] (3)

[0068] After secondary control The voltage droop control equation for the distributed generation unit is:

[0069] (4)

[0070] In the formula, For the first Frequency compensation amount of distributed generation units; For the first Voltage compensation amount of the distributed generation unit.

[0071] Equations (1) and (2) above are formalized expressions of the primary control principle, while equations (3) and (4) are formalized expressions of the secondary control principle.

[0072] Model predictive control first acquires the current system measurement value at the current sampling time and predicts the system output over a future period based on a pre-built predictive model. Then, it constructs an objective function and constraints based on the predicted values, transforms it into a constrained quadratic programming problem, and solves it to obtain the optimal control sequence. Finally, it applies the first control variable in the sequence to the system and repeats the above process at the next time step to achieve rolling optimization of the system.

[0073] The following section details the steps of the secondary control method based on model predictive control.

[0074] Step S1 includes:

[0075] No. Local measurements from the distributed generation unit include: The frequency, voltage, active power, and reactive power output of the distributed generation unit.

[0076] Step S2 includes:

[0077] S21: Based on the local measurements of each distributed generation unit at the current moment and the pre-built prediction model, calculate the output variables and control vector increments of each distributed generation unit at the current moment.

[0078] S22: Based on the output variables of each distributed generation unit at the current moment, calculate the consistency error of each distributed generation unit at the current moment;

[0079] S23: Combine the output variables, consistency errors, and control vector increments of each distributed generation unit at the current moment to obtain the degree of deviation caused by the first control of each distributed generation unit.

[0080] The deviation level designed in this embodiment can characterize the degree of voltage and frequency deviation caused by the primary control of each distributed unit.

[0081] In step S21, based on the local measurements of the distributed generation unit at the current moment and the pre-built prediction model, the output variables of the distributed generation unit at the current moment are calculated, including:

[0082] SC1: Obtain the local measurement values ​​and corresponding rated or set values ​​of the distributed generation unit, and calculate the difference between each local measurement value and the corresponding rated or set value;

[0083] SC2: The system status at the current moment is composed of the differences between each local measured value and the corresponding rated value or set value; the system status at each moment includes frequency difference, voltage difference, active power difference and reactive power difference;

[0084] SC3: Input the current system state into the pre-constructed discrete state model, and calculate the output variable at the current moment; the discrete state model is obtained by discretizing the continuous state model based on the differential equation of the first-order inertial system.

[0085] The specific procedures for steps SC1 and SC2 are as follows:

[0086] No. System status of distributed generation units The expression is:

[0087] (5)

[0088] In the formula, For the first The frequency output by the distributed generation unit; The rated frequency; For the first The voltage output by the distributed generation unit; Rated voltage; Represented as the first The active power output of the distributed generation unit; For the first Active power setpoint of the distributed generation unit; Represented as the first The reactive power output of the distributed generation unit; This is a transpose operation; For the first Reactive power setpoints for each distributed generation unit;

[0089] No. Frequency difference of distributed generation units for: (6)

[0090] No. Voltage difference of distributed generation units for: (7)

[0091] No. Active power difference of distributed generation units in Taiwan for: (8)

[0092] No. reactive power difference of distributed generation units in Taiwan for: (9)

[0093] Based on equations (6) to (9), transforming equation (5) yields the first equation shown in equation (10). System state expression for the distributed generation unit:

[0094] (10)

[0095] In step SC3, a continuous state model is constructed based on the differential equations of the first-order inertial system, including:

[0096] Based on the frequency first-order inertial system differential equation output by the distributed generation unit and the frequency droop control equation after secondary control, a continuous state differential equation for frequency difference is constructed.

[0097] Based on the first-order inertial system differential equation of the voltage output of the distributed generation unit and the voltage droop control equation after secondary control, a continuous state differential equation of voltage difference is constructed.

[0098] Based on the first-order inertial system differential equation of active power output from distributed generation units and the frequency droop control equation after secondary control, a continuous state differential equation for active power difference is constructed.

[0099] Based on the first-order inertial system differential equation of reactive power output from distributed generation units and the voltage droop control equation after secondary control, a continuous state differential equation for reactive power difference is constructed.

[0100] A continuous state model is constructed based on the continuous state differential equations for frequency difference, voltage difference, active power difference, and reactive power.

[0101] The specific process for constructing a continuous state model is as follows:

[0102] The voltage and current at the output of the LC filter of the distributed generation unit are measured and sampled, then filtered to calculate the instantaneous active and reactive power. After digital low-pass filtering, they are sent to frequency droop control and voltage droop control, respectively. The measurement and sampling filtering, along with the digital low-pass filtering, constitute a first-order inertial measurement filtering stage, ensuring that the frequency, voltage, active power, and reactive power output of each distributed generation unit exhibit first-order inertial characteristics. Its dynamic process conforms to the differential equations of a first-order inertial system.

[0103] No. The first-order inertial system differential equation for the active power output of the distributed generation unit is:

[0104] (11)

[0105] In the formula, The active power time constant; For the first Active power output of the distributed generation unit The derivative with respect to time; For the first The active power target value of the distributed generation unit is the input value of the active power first-order inertial system; For the first The active power output by the distributed generation unit is the output value of the first-order inertial system of active power. In this embodiment, the active power in steady state has no steady-state error to track the target value of active power, so the coefficient before the target value of active power on the right side of equation (11) is set to 1.

[0106] Transforming equation (11) yields the derivative form of active power: (12)

[0107] According to equation (8), we obtain the first... Active power difference of distributed generation units in Taiwan derivative with respect to time for: (13)

[0108] According to equations (12) and (13), we get: (14)

[0109] No. Active power target value of distributed generation units in Taiwan The frequency needs to be calculated using formula (3):

[0110] (15)

[0111] The frequency calculated by equation (15) is controlled by voltage control and power inner loop to control the output active power of the distributed generation unit;

[0112] Therefore, by transforming equation (15), we obtain: (16)

[0113] Substituting equation (16) into equation (14), and based on equations (6) and (8), we obtain:

[0114] (17)

[0115] According to equation (17), we obtain the first... The continuous state differential equation for the active power difference of the distributed generation unit:

[0116] (18)

[0117] Similarly, by analogy with the derivation process of equations (11) to (18), we can obtain the first... The continuous state differential equation for the reactive power difference of a distributed generation unit:

[0118] (19)

[0119] In the formula, For the first reactive power difference of distributed generation units in Taiwan The derivative with respect to time; The reactive power time constant; in this embodiment, the active power time constant. and The reactive power time constants are equal.

[0120] No. The first-order differential equation of the inertial system output from the distributed generation unit is as follows:

[0121] (20)

[0122] In the formula, The active power time constant; For the first The frequency output of the distributed generation unit The derivative with respect to time; For the first The target frequency value of the distributed generation unit is the input value of the first-order inertial system. For the first The frequency output by the distributed generation unit is the output value of the active power first-order inertial system;

[0123] Equation (20) can be transformed to obtain the frequency derivative form: ,(twenty one)

[0124] According to equation (6), we obtain the first... Frequency difference of distributed generation units derivative with respect to time for: ,(twenty two)

[0125] According to equations (21) and (22), we get: ,(twenty three)

[0126] No. Frequency target value of distributed generation unit Calculated and generated by equation (3):

[0127] ,(twenty four)

[0128] Substituting equation (24) into equation (23), and according to equations (6) and (8), we get:

[0129] (25)

[0130] According to equation (25), we obtain the first... Continuous state differential equation for the frequency difference of a distributed generation unit:

[0131] (26)

[0132] Similarly, by analogy with the derivation process of equations (20) to (26), we can obtain the first... The continuous state differential equation for the voltage difference of a distributed generation unit:

[0133] (27)

[0134] In the formula, For the first Voltage difference of distributed generation units The derivative with respect to time;

[0135] According to the The frequency difference, voltage difference, active power difference, and reactive power of the distributed generation units are given by the continuous state differential equations, i.e., the corresponding continuous state differential equation sets are formed according to equations (18), (19), (26), and (27). The continuous state differential equations of the distributed generation unit are as follows:

[0136] (28)

[0137] According to the first of equation (28) The continuous state differential equations of the distributed generation unit and the first equation of equation (10) The system status of the distributed generation unit is established. The continuous state-space expression of the distributed generation unit:

[0138] (29)

[0139] In the formula, For the first System status of distributed generation units The derivative with respect to time; the first derivative. Frequency compensation amount of distributed generation units and voltage compensation amount For the first The control quantity of the secondary control of the distributed generation unit, the first Control vector of distributed generation unit The expression is: (30)

[0140] Order No. State coefficient matrix of distributed generation unit in continuous system The expression is:

[0141] (31)

[0142] No. Control coefficient matrix of distributed generation units in a continuous system The expression is:

[0143] (32)

[0144] According to equations (29) to (32), we obtain the first... The continuous state-space expression of the distributed generation unit is:

[0145] (33)

[0146] Further establish the first according to equation (33) The continuous state model of the distributed generation unit is as follows:

[0147] (34)

[0148] In the formula, For the first The output system status of the distributed generation unit in the continuous system; For the first The unit matrix of distributed generation units in a continuous system, and They are all the same size. .

[0149] In step SC3, the continuous state model is discretized to obtain a discrete state model, including:

[0150] This embodiment uses Model Predictive Control (MPC) to make rolling predictions of the output system state. However, MPC can only work at discrete time points. Therefore, it is necessary to transform the continuous state model into a discrete state model as the prediction model for MPC in this embodiment.

[0151] Regarding the first The continuous state model of the distributed generation unit is adapted to the sampling period. for In this digital control environment with a time limit of 1 second, the zero-order hold assumption is adopted in this embodiment, that is, the control vector remains unchanged in each sampling period, and the zero-order hold is used to hold the control vector. Discretizing the continuous-state model of the distributed generation unit yields the first state model suitable for rolling prediction in model predictive control. Discrete state model of distributed generation unit.

[0152] No. Taiwan distributed generation unit in The discrete state model at time t is:

[0153] (35)

[0154] In the formula, For the first Taiwan distributed generation unit in The system state at time t refers to the state at time t. The system state at each sampling time, i.e., the sampling interval Internal system state; For the first The state coefficient matrix of a distributed generation unit in a discrete system; For the first Taiwan distributed generation unit in The system state at time t refers to the state at time t. The system state at each sampling time, i.e., the sampling interval Internal system state; For the first The control coefficient matrix of a distributed generation unit in a discrete system; For the first Taiwan distributed generation unit in Control vector at time; For the first Taiwan distributed generation unit in Output the system status at any given time; For the first The identity matrix of the distributed generation unit in the discrete system; where, the first State coefficient matrix of distributed generation unit in discrete system The calculation formula is: , (36), p. Control coefficient matrix of distributed generation unit in discrete system The calculation formula is: (37) Sampling period At a certain point in time, Represents the natural constant.

[0155] The predictive model for model predictive control in this embodiment is a discrete-state model. The discrete state model of the distributed generation unit at each sampling time is based on the first... The system state and control vector input by the distributed generation unit at the current moment are used to perform rolling prediction of the output system state variables at various future moments in the prediction time domain, thereby obtaining the evolution trend of the output system state.

[0156] Step SC3 inputs the current system state into the pre-built discrete state model and calculates the output variables for the current time, including:

[0157] SC31: Input the current system state into a pre-built discrete state model to obtain the current output system state;

[0158] SC32: Calculate the reliability of the active power difference and reactive power difference in the output system state at the current moment, and obtain the active power reliability factor and reactive power reliability factor at the current moment.

[0159] SC33: The active power confidence factor and reactive power confidence factor are weighted respectively on the active power difference and reactive power difference in the output system state at the current moment to obtain the weighted active power difference and reactive power difference at the current moment.

[0160] SC34: Normalizes the frequency difference and voltage difference, as well as the weighted active power difference and reactive power difference at the current moment in the output system state, and outputs the output variables at the current moment.

[0161] No. Taiwan distributed generation unit in Steps SC31 to SC34 are executed at any given time, and the process is as follows:

[0162] The first Taiwan distributed generation unit in System state at time 1 Input a pre-constructed discrete state model to obtain the first... Taiwan distributed generation unit in Output system state at any time ,

[0163] (38)

[0164] In the formula, For the first Taiwan distributed generation unit in The frequency difference in the output system state at any given time; For the first Taiwan distributed generation unit in The voltage difference in the output system state at any given time; For the first Taiwan distributed generation unit in The difference in active power in the output system state at any given time; For the first Taiwan distributed generation unit in The reactive power difference in the output system state at any given time.

[0165] No. Taiwan distributed generation unit in Active power confidence factor at time The calculation formula is:

[0166] (39)

[0167] In the formula, This is the preset active power difference sensitivity coefficient. The degree to which the active power reliability factor affects active power deviation is determined through pre-testing and debugging. ;

[0168] No. Taiwan distributed generation unit in Reactive power reliability factor at time The calculation formula is:

[0169] (40)

[0170] In the formula, This is the preset voltage difference sensitivity coefficient. This is used to adjust the degree of influence of the reactive power reliability factor on reactive power deviation, and is determined through pre-testing and debugging. ; and The value range is from 0 to 1.

[0171] No. The output system state of a distributed generation unit at each moment includes four variables: frequency difference, voltage difference, active power difference, and reactive power difference. In order to eliminate the difference in dimensions between variables, each variable needs to be normalized separately.

[0172] No. Taiwan distributed generation unit in The output variable at time t is:

[0173] (41)

[0174] In the formula, For the first Taiwan distributed generation unit in The frequency difference in the output variables at any given time; For the first Taiwan distributed generation unit in The frequency difference in the output system state at any given time; The rated frequency; For the first Taiwan distributed generation unit in The voltage difference in the output variables at any given time; For the first Taiwan distributed generation unit in The voltage difference in the output system state at any given time; Rated voltage; For the first Taiwan distributed generation unit in The difference in active power in the output variables at any given time; For the first Taiwan distributed generation unit in The reliability factor of active power at any given time; For the first Taiwan distributed generation unit in The difference in active power in the output system state at any given time; For the first The rated active power of the distributed generation unit; For the first Taiwan distributed generation unit in The reactive power difference in the output variables at any given time; For the first Taiwan distributed generation unit in Reactive power reliability factor at any given time; For the first Taiwan distributed generation unit in The reactive power difference in the output system state at any given time; For the first The rated reactive power of each distributed generation unit. In this embodiment, the rated active power and rated reactive power of the four distributed generation units are the same.

[0175] In step S21, based on the local measurements of the distributed generation unit at the current moment and the pre-built prediction model, the control vector increment of the distributed generation unit at the current moment is calculated, including:

[0176] No. Taiwan distributed generation unit in Control vector increment at time 1 The calculation formula is:

[0177] (42)

[0178] In the formula, For the first Taiwan distributed generation unit in Control vector at time; For the first Taiwan distributed generation unit in Control vector at time;

[0179] (43)

[0180] In the formula, For the first Taiwan distributed generation unit in Frequency compensation amount at any given moment; For the first Taiwan distributed generation unit in Voltage compensation amount at any given time;

[0181] (44)

[0182] In the formula, For the first Taiwan distributed generation unit in Frequency compensation amount at any given moment; For the first Taiwan distributed generation unit in Voltage compensation amount at any given time.

[0183] In step S22, the consistency error of the distributed generation unit at the current moment is calculated, including steps YZ1 to YZ2: the consistency error is determined by the communication topology of the distributed microgrid. When the communication topology of the distributed microgrid changes, the calculation of the consistency error needs to be adjusted for adaptability.

[0184] In this embodiment, the communication topology of the distributed microgrid is as follows: each distributed generation unit communicates only unidirectionally with its only neighboring distributed generation unit and receives the output variables of its neighboring distributed generation unit; each distributed generation unit serves only as a neighboring distributed generation unit of a single other distributed generation unit.

[0185] In this embodiment, the neighboring distributed generation unit of the second distributed generation unit is the first distributed generation unit, and it receives the output variables of the first distributed generation unit; the neighboring distributed generation unit of the third distributed generation unit is the second distributed generation unit, and it receives the output variables of the second distributed generation unit; the neighboring distributed generation unit of the fourth distributed generation unit is the third distributed generation unit, and it receives the output variables of the third distributed generation unit; the neighboring distributed generation unit of the first distributed generation unit is the fourth distributed generation unit, and it receives the output variables of the fourth distributed generation unit.

[0186] YZ1: Obtain the output variables of the distributed generation unit at the current moment, and the output variables of its neighboring distributed generation units at the current moment, which are received through communication; the output variables of the neighboring distributed generation units at the current moment are: the optimal control vector of the previous moment is obtained by using the increment of the optimal control vector of the neighboring distributed generation unit at the previous moment, and after compensating for the frequency and voltage deviation caused by the first control of the neighboring distributed generation unit, the output variables are calculated based on the local measurement value of the neighboring distributed generation unit at the current moment and the pre-built prediction model.

[0187] YZ2: Calculate the difference between the two output variables to obtain the consistency error of the distributed generation unit at the current moment.

[0188] No. Taiwan distributed generation unit in The consistency error at time step is:

[0189] (45)

[0190] In the formula, For the first Distributed generation unit neighboring distributed generation units exist Output variables at any given time; To use neighboring distributed generation units exist Optimal control vector increment at time t The corresponding distributed generation units of the neighbors are obtained. exist Optimal control vector at time 1 Compensation for neighboring distributed generation units After the frequency and voltage deviation caused by a single control operation, based on the neighboring distributed generation unit exist The output variables are calculated using local measurements at a given time and a pre-built prediction model; neighboring distributed generation units. exist Optimal control vector at time 1 The calculation formula is:

[0191] (46)

[0192] In the formula, Distributed generation units for neighbors exist The optimal control vector at time t.

[0193] In step S23, the output variables, consistency error, and control vector increment of the distributed generation unit at the current moment are combined to obtain the degree of deviation caused by the primary control of the distributed generation unit, including:

[0194] No. Taiwan distributed generation unit in The degree of deviation in time is:

[0195] No. Taiwan distributed generation unit in Output variables at time 1 Consistency error and control vector increment .

[0196] In step S3, based on the deviation level of the distributed generation unit at the current time, a constrained quadratic programming problem is constructed and solved, and the optimal control vector increment of the distributed generation unit at the current time is output, including:

[0197] No. Taiwan distributed generation unit in The constrained quadratic programming problem is as follows:

[0198] Minimize the Taiwan distributed generation unit in Objective function of model predictive control at time step ,

[0199] No. Taiwan distributed generation unit in Objective function of model predictive control at time step The calculation formula is:

[0200] (47)

[0201] The corresponding constraints are:

[0202] (48)

[0203] (49)

[0204] (50)

[0205] In the formula, The preset prediction time domain refers to the total number of steps to predict the future in each sampling period; The prediction time number within the prediction time domain; For the first Taiwan distributed generation unit in Output variables at time 1 For the Taiwan's distributed generation units in the future The output variables predicted at each time step; For the first The weight matrix of the output variables of the distributed generation unit; For the first Distributed generation unit neighboring distributed generation units exist Output variables at time 1 For neighboring distributed generation units future The output variables predicted at each time step; For the first The weight matrix of consistency error of distributed generation units; The preset control time domain refers to the total number of steps for the actual optimized control vector increment. To control the control time sequence number within the control time domain; For the first Taiwan distributed generation unit in Control vector increment at time 1 For the Taiwan's distributed generation units in the future The increment of the control vector for time-mapping; For the first The weight matrix of the control vector increment of the distributed generation unit; , and This refers to weighted square norm operations; This is the lower limit of the output variables of a single distributed generation unit as preset; This is the upper limit of the output variables of a single distributed generation unit (DGU). This is the lower limit of the preset control vector for a single distributed generation unit; This is the upper limit of the control vector for a single distributed generation unit (DGU). This is the lower limit of the preset control vector increment for a single distributed generation unit; This is the upper limit of the control vector increment for a single distributed generation unit.

[0206] (51)

[0207] (52) (53)

[0208] In this embodiment, the weight matrix of the output variable, the weight matrix of the consistency error, and the weight matrix of the control vector increment for each distributed generation unit are set according to the actual debugging results. For example, the weight matrix of the output variable and the weight matrix of the consistency error for each distributed generation unit can be uniformly set to a diagonal matrix diag(1,1,1,1) or a diagonal matrix diag(5,5,1,1), and the weight matrix of the control vector increment for each distributed generation unit can be uniformly set to a diagonal matrix diag(1,1) or a diagonal matrix diag(5,5).

[0209] Call the quadratic programming problem solver to the th Taiwan distributed generation unit in Solving the constrained quadratic programming problem at each time step yields the optimal control vector increment sequence for the corresponding future time steps. The first element of the optimal control vector increment sequence is output as the first... The optimal control vector increment of the distributed generation unit at the current moment; the first Taiwan distributed generation unit in Optimal control vector increment sequence at time step for:

[0210] (54)

[0211] in, For the first Taiwan distributed generation unit in Each element in the sequence of optimal control vector increments for future time steps is the optimal control vector increment for the corresponding future time step.

[0212] Output the first element in the optimal control vector increment sequence As the first Taiwan distributed generation unit in Optimal control vector increment at time t .

[0213] (55)

[0214] In the formula, For the first Taiwan distributed generation unit in The optimal frequency compensation increment at time t. For the first Taiwan distributed generation unit in The optimal frequency compensation amount at any given time. For the first Taiwan distributed generation unit in The optimal frequency compensation amount at any given time; For the first Taiwan distributed generation unit in The optimal voltage compensation increment at any given time. For the first Taiwan distributed generation unit in The optimal voltage compensation amount at any given time. For the first Taiwan distributed generation unit in The optimal voltage compensation amount at any given time.

[0215] In step S4, the optimal control vector for the current moment is obtained by using the increment of the optimal control vector of the distributed generation unit at the current moment. This compensates for the frequency and voltage deviations caused by the primary control of the distributed generation unit, and waits for the local measurement value of the distributed generation unit to be acquired at the next moment. This includes:

[0216] Through the first Taiwan distributed generation unit in Optimal control vector increment at time t The corresponding number is 1. Taiwan distributed generation unit in Optimal control vector at time 1 ;No. Taiwan distributed generation unit in Optimal control vector at time 1 The calculation formula is:

[0217] (56)

[0218] In the formula, For the first Taiwan distributed generation unit in The optimal control vector at time t; For the first Taiwan distributed generation unit in The increment of the optimal control vector at time t;

[0219] Adopting the first Taiwan distributed generation unit in The optimal control vector at time 1, compensating for the 1st time. Frequency and voltage deviations caused by the primary control of the distributed generation unit, and waiting to obtain the first... Taiwan distributed generation unit in Local measurements at any given time.

[0220] By cyclically executing model predictive control steps S1 to S5 at various times for each distributed generation unit, rolling optimization compensation can be performed on the voltage and frequency deviations caused by the primary control of each distributed generation unit, thereby realizing secondary control of the distributed microgrid.

[0221] This embodiment constructs a distributed microgrid model consisting of four distributed generation units connected in parallel. The implementation effect of the model predictive control-based secondary control method of this invention is tested. The first to fourth distributed generation units are named DG1, DG2, DG3, and DG4, respectively. A model predictive controller is designed and applied to the secondary control of the distributed microgrid, replacing the traditional PI control. The frequency, voltage, active power, and reactive power output of each distributed generation unit are observed and compared with those of a distributed microgrid using the traditional PI control method. The microgrid operates in islanded mode. Time t ranges from 0 to 2 seconds, representing the startup to stabilization time. From time t=2 seconds, a continuous 10Hz attack is applied to the frequency measurement channel of DG2. Under the same attack scenario, the secondary control method based on traditional PI control and the secondary control method based on model predictive control are run respectively, and the changes in the operating status of the output frequency, voltage, active power, and reactive power of each distributed generation unit during this period are observed.

[0222] In this embodiment, Figure 2 , Figure 4 , Figure 6 , Figure 8 This is a diagram showing the effect of using the traditional PI control method for secondary control. Figure 3 , Figure 5 , Figure 7 , Figure 9 The diagram shows the effect of using the model predictive control-based secondary control method of the present invention for secondary control.

[0223] For the operating conditions, the rated frequency is 50Hz and the rated voltage is 311V. In this embodiment, voltage refers to voltage amplitude, starting from the second second of the attack. Figure 2 The frequencies output by each of the distributed generation units shown increased to varying degrees and could not be recovered. Figure 3 The output frequencies of each distributed generation unit shown are basically stable. Figure 4 The voltage output of each of the distributed generation units shown fluctuates drastically, while Figure 5The voltage output of each distributed generation unit shown is basically stable. It can be seen that the frequency of the secondary control output of each distributed generation unit using the model predictive control-based secondary control method can still maintain basic voltage stability after being attacked by false data injection.

[0224] Regarding power allocation, starting from the second second of the attack, Figure 6 and Figure 7 The diagrams illustrate the changes in active power output for each distributed generation unit using both traditional PI control and the model predictive control-based secondary control method of this invention. It is clear that... Figure 6 The active power waveforms output by each distributed generation unit shown in the diagram became unstable under the attack and fluctuated violently due to the lack of constraints. The maximum active power output of DG1 reached 200kW, far exceeding the ideal active power setpoint of 15kW. However, due to the rolling optimization effect of the model predictive control-based secondary control method of this invention, Figure 7 The active power waveforms of each distributed generation unit shown in the figure eventually recovered to stability and achieved power equalization under the attack. The active power output of each distributed generation unit was stabilized at the active power set value of about 15kW. Figure 8 and Figure 9 The diagrams show the reactive power changes of each distributed generation unit under secondary control using traditional PI control and the model predictive control method of this invention. Since the experiment only considers active power load, i.e., the load is resistive, the reactive power of the distributed microgrid model in the experiment is 0 under normal operation. Figure 8 The reactive power waveforms output by each distributed generation unit shown cannot recover stability after being attacked and fluctuate wildly due to a lack of constraints. The maximum reactive power output of DG1 reaches 250 kvar, far exceeding the ideal reactive power setting value of 0. Figure 9 The reactive power waveforms output by each distributed generation unit shown can quickly and stably recover to 0 after being attacked.

[0225] Experiments show that, in comparison, the model predictive control-based secondary control method of this invention can effectively resist spoofed data injection attacks.

[0226] Example 2

[0227] Based on the same inventive concept as Embodiment 1, this embodiment introduces a secondary control device based on model predictive control, including: a measurement value acquisition module, a deviation calculation module, a control quantity acquisition module, and a compensation execution module;

[0228] The measurement value acquisition module is used to acquire the local measurement values ​​of each distributed generation unit in the distributed microgrid at the current moment; the measurement values ​​include frequency, voltage, active power and reactive power;

[0229] The deviation calculation module is used to input the local measurement values ​​of each distributed generation unit at the current moment into a pre-built prediction model, and calculate the degree of frequency and voltage deviation caused by the primary control of each distributed generation unit. The degree of deviation of the distributed generation unit at the current moment includes: output variable, consistency error, and control vector increment. The output variable represents the theoretical deviation between the local measurement value and the rated value or set value. The consistency error represents the deviation between the output variable and the output variable of its neighboring distributed generation unit obtained through communication. The control vector increment represents the deviation of the control vector at the current moment from the previous moment. The control vector includes frequency compensation and voltage compensation.

[0230] The control quantity acquisition module is used to construct and solve constrained quadratic programming problems based on the deviation of each distributed generation unit at the current time, and output the optimal control vector increment of each distributed generation unit at the current time; the optimal control vector increment includes the optimal frequency compensation increment and the optimal voltage compensation increment.

[0231] The compensation execution module is used to obtain the optimal control vector at the current moment by using the increment of the optimal control vector of each distributed generation unit at the current moment, to compensate for the frequency and voltage deviations caused by the first control of each distributed generation unit, and to wait to obtain the local measurement values ​​of each distributed generation unit at the next moment.

[0232] The secondary control device based on model predictive control provided in this embodiment of the invention can execute the secondary control method based on model predictive control provided in Embodiment 1 of the invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0233] Example 3

[0234] This invention also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the method described in Embodiment 1.

[0235] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0236] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0237] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0238] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0239] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the technical principles of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. A quadratic control method based on model predictive control, characterized in that, include: Obtain the local measurement values ​​of each distributed generation unit in the distributed microgrid at the current moment; Local measurements include frequency, voltage, active power, and reactive power; Based on the local measurements of each distributed generation unit at the current moment and the pre-built prediction model, the degree of frequency and voltage deviation caused by the primary control of each distributed generation unit is calculated. The degree of deviation of the distributed generation unit at the current moment includes: output variable, consistency error and control vector increment. The output variable represents the theoretical deviation between the local measured value and the rated value or set value; the consistency error represents the deviation between the output variable and the output variable of its neighboring distributed generation unit obtained by communication; the control vector increment represents the deviation between the control vector at the current time and the control vector at the previous time; the control vector includes frequency compensation and voltage compensation. Based on the deviation of each distributed generation unit at the current moment, a constrained quadratic programming problem is constructed and solved to output the optimal control vector increment of each distributed generation unit at the current moment; the optimal control vector increment includes the optimal frequency compensation increment and the optimal voltage compensation increment. By using the incremental value of the optimal control vector of each distributed generation unit at the current moment, the optimal control vector at the current moment is obtained. This is used to compensate for the frequency and voltage deviations caused by the primary control of each distributed generation unit, and to wait for the local measurement values ​​of each distributed generation unit at the next moment.

2. The secondary control method based on model predictive control according to claim 1, characterized in that, The prediction model is a discrete-state model; based on the local measurements of the distributed generation unit at the current moment and the pre-built prediction model, the output variables of the distributed generation unit at the current moment are calculated, including: Obtain the local measurement values ​​and corresponding rated or set values ​​of the distributed generation unit, and calculate the difference between each local measurement value and the corresponding rated or set value; The differences between each local measurement value and its corresponding rated or set value constitute the system state at the current moment; the system state at each moment includes frequency difference, voltage difference, active power difference, and reactive power difference; The current system state is input into a pre-constructed discrete state model, and the output variable at the current moment is obtained through calculation. The discrete state model is obtained by discretizing a continuous state model based on the differential equation of a first-order inertial system.

3. The secondary control method based on model predictive control according to claim 2, characterized in that, A continuous state model is constructed based on the differential equations of a first-order inertial system. This continuous state model is then discretized to obtain a discrete state model, including: Based on the frequency first-order inertial system differential equation output by the distributed generation unit and the frequency droop control equation after secondary control, a continuous state differential equation for frequency difference is constructed. Based on the first-order inertial system differential equation of the voltage output of the distributed generation unit and the voltage droop control equation after secondary control, a continuous state differential equation of voltage difference is constructed. Based on the first-order inertial system differential equation of active power output from distributed generation units and the frequency droop control equation after secondary control, a continuous state differential equation for active power difference is constructed. Based on the first-order inertial system differential equation of reactive power output from distributed generation units and the voltage droop control equation after secondary control, a continuous state differential equation for reactive power difference is constructed. A continuous state model is constructed based on the continuous state differential equations for frequency difference, voltage difference, active power difference, and reactive power. Based on the zero-order hold assumption, the continuous state model is discretized to obtain the discrete state model.

4. The secondary control method based on model predictive control according to claim 3, characterized in that, According to the The continuous state differential equations for the frequency difference, voltage difference, active power difference, and reactive power of the distributed generation units are used to obtain the corresponding discrete state models, including: According to the The frequency difference, voltage difference, active power difference, and reactive power of the distributed generation units form a corresponding set of continuous state differential equations. The continuous state differential equations of the distributed generation unit are as follows: , In the formula, For the first Frequency difference of distributed generation units The derivative with respect to time; For the first Voltage difference of distributed generation units The derivative with respect to time; For the first Active power difference of distributed generation units in Taiwan The derivative with respect to time; For the first reactive power difference of distributed generation units in Taiwan The derivative with respect to time; This is the preset active power time constant; This is the preset reactive power time constant; It is the preset number Active power droop factor of distributed generation unit; It is the preset number The reactive power droop factor of each distributed generation unit; For the first Frequency compensation amount of distributed generation units; For the first Voltage compensation amount of the distributed generation unit; According to the The continuous state differential equations of the distributed generation unit are used to construct the corresponding continuous state model. The continuous state model of the distributed generation unit is as follows: , In the formula, For the first System status of distributed generation units The derivative with respect to time; For the first State coefficient matrix of distributed generation units in a continuous system; For the first Control coefficient matrix of distributed generation units in a continuous system; For the first Control vector of the distributed generation unit; For the first The output system status of the distributed generation unit in the continuous system; For the first The identity matrix of distributed generation units in a continuous system; ; ; This is a transpose operation; ; ; ; ; The first The continuous state model of the distributed generation unit is discretized to obtain the corresponding discrete state model. Taiwan distributed generation unit in The discrete state model at time t is: , In the formula, For the first Taiwan distributed generation unit in The system state at any given moment; For the first The state coefficient matrix of a distributed generation unit in a discrete system; For the first Taiwan distributed generation unit in The system state at any given moment; For the first The control coefficient matrix of a distributed generation unit in a discrete system; For the first Taiwan distributed generation unit in Control vector at time; For the first Taiwan distributed generation unit in The output system state of a time-discrete system; For the first The identity matrix of the distributed generation unit in the discrete system; where, the first State coefficient matrix of distributed generation unit in discrete system The calculation formula is: , No. Control coefficient matrix of distributed generation unit in discrete system The calculation formula is: , Sampling period At a certain point in time, Represents the natural constant.

5. The secondary control method based on model predictive control according to claim 2, characterized in that, The process of inputting the current system state into a pre-constructed discrete state model and calculating the output variable at the current moment includes: Input the current system state into a pre-built discrete state model to obtain the current output system state; The credibility of the active power difference and reactive power difference in the output system state at the current moment is calculated, and the corresponding active power credibility factor and reactive power credibility factor at the current moment are obtained. The active power confidence factor and reactive power confidence factor are weighted respectively on the active power difference and reactive power difference in the output system state at the current moment to obtain the weighted active power difference and reactive power difference at the current moment. The frequency difference and voltage difference in the output system state, as well as the weighted active power difference and reactive power difference at the current moment, are normalized respectively, and the output variables at the current moment are output. No. Taiwan distributed generation unit in Output variables at time 1 for: , In the formula, For the first Taiwan distributed generation unit in The frequency difference in the output variables at any given time; For the first Taiwan distributed generation unit in The frequency difference in the output system state at any given time; The rated frequency; For the first Taiwan distributed generation unit in The voltage difference in the output variables at any given time; For the first Taiwan distributed generation unit in The voltage difference in the output system state at any given time; Rated voltage; For the first Taiwan distributed generation unit in The difference in active power in the output variables at any given time; For the first Taiwan distributed generation unit in The reliability factor of active power at any given time; For the first Taiwan distributed generation unit in The difference in active power in the output system state at any given time; For the first The rated active power of the distributed generation unit; For the first Taiwan distributed generation unit in The reactive power difference in the output variables at any given time; For the first Taiwan distributed generation unit in Reactive power reliability factor at any given time; For the first Taiwan distributed generation unit in The reactive power difference in the output system state at any given time; For the first The rated reactive power of the distributed generation unit; This is a transpose operation; No. Taiwan distributed generation unit in Active power confidence factor at time The calculation formula is: , In the formula, This is the preset sensitivity coefficient for active power difference; No. Taiwan distributed generation unit in Reactive power reliability factor at time The calculation formula is: , In the formula, This is the preset reactive power difference sensitivity coefficient.

6. The secondary control method based on model predictive control according to claim 4, characterized in that, Based on the local measurements of the distributed generation unit at the current moment and the pre-built prediction model, the control vector increment of the distributed generation unit at the current moment is calculated, including: No. Taiwan distributed generation unit in Control vector increment at time 1 The calculation formula is: , In the formula, For the first Taiwan distributed generation unit in Control vector at time; For the first Taiwan distributed generation unit in Control vector at time; , In the formula, For the first Taiwan distributed generation unit in Frequency compensation amount at any given moment; For the first Taiwan distributed generation unit in Voltage compensation amount at any given time; , In the formula, For the first Taiwan distributed generation unit in Frequency compensation amount at any given moment; For the first Taiwan distributed generation unit in Voltage compensation amount at any given time.

7. The secondary control method based on model predictive control according to claim 2, characterized in that, The consistency error of the distributed generation unit at the current moment is calculated, including: Each distributed generation unit communicates only with its one neighboring distributed generation unit in one direction and receives the output variables of its neighboring distributed generation unit. The output variables of the distributed generation unit at the current moment are obtained, as well as the output variables of its neighboring distributed generation units at the current moment, which are received through communication. The output variables of the neighboring distributed generation units at the current moment are: the optimal control vector of the previous moment is obtained by using the increment of the optimal control vector of the neighboring distributed generation unit at the previous moment, and the frequency and voltage deviation caused by the first control of the neighboring distributed generation unit is compensated. The output variables are calculated based on the local measurement values ​​of the neighboring distributed generation units at the current moment. The difference between the two output variables is calculated to obtain the consistency error of the distributed generation unit at the current moment.

8. The secondary control method based on model predictive control according to claim 7, characterized in that, No. Taiwan distributed generation unit in The constrained quadratic programming problem is as follows: Minimize the Taiwan distributed generation unit in Objective function of model predictive control at time step , No. Taiwan distributed generation unit in Objective function of model predictive control at time step The calculation formula is: , The corresponding constraints are: , , , In the formula, This is the preset prediction time domain; The prediction time number within the prediction time domain; For the first Taiwan distributed generation unit in Output variables at time 1 For the first Taiwan's distributed generation units in the future The output variables predicted at each time step; For the first The weight matrix of the output variables of the distributed generation unit; For the first Distributed generation unit neighboring distributed generation units exist Output variables at time 1 For neighboring distributed generation units future The output variables predicted at each time step; For the first The weight matrix of consistency error of distributed generation units; This is the preset control time domain; To control the control time sequence number within the control time domain; For the first Taiwan distributed generation unit in Control vector increment at time 1 For the first Taiwan's distributed generation units in the future The increment of the control vector for time-mapping; For the first The weight matrix of the control vector increment of the distributed generation unit; , and This refers to weighted square norm operations; This is the lower limit of the output variables of a single distributed generation unit as preset; This is the upper limit of the output variables of a single distributed generation unit (DGU). This is the lower limit of the preset control vector for a single distributed generation unit; This is the upper limit of the control vector for a single distributed generation unit (DGU). This is the lower limit of the preset control vector increment for a single distributed generation unit; This is the upper limit of the control vector increment for a single distributed generation unit.

9. A secondary control device based on model predictive control, characterized in that, The method described in claim 1 comprises: a measurement value acquisition module, a deviation calculation module, a control quantity acquisition module, and a compensation execution module; The measurement value acquisition module is used to acquire the local measurement values ​​of each distributed generation unit in the distributed microgrid at the current moment; the measurement values ​​include frequency, voltage, active power and reactive power; The deviation calculation module is used to input the local measurement values ​​of each distributed generation unit at the current moment into a pre-built prediction model, and calculate the degree of frequency and voltage deviation caused by the primary control of each distributed generation unit. The degree of deviation of the distributed generation unit at the current moment includes: output variable, consistency error, and control vector increment. The output variable represents the theoretical deviation between the local measurement value and the rated value or set value. The consistency error represents the deviation between the output variable and the output variable of its neighboring distributed generation unit obtained through communication. The control vector increment represents the deviation of the control vector at the current moment from the previous moment. The control vector includes frequency compensation and voltage compensation. The control quantity acquisition module is used to construct and solve constrained quadratic programming problems based on the deviation of each distributed generation unit at the current time, and output the optimal control vector increment of each distributed generation unit at the current time; the optimal control vector increment includes the optimal frequency compensation increment and the optimal voltage compensation increment. The compensation execution module is used to obtain the optimal control vector at the current moment by using the increment of the optimal control vector of each distributed generation unit at the current moment, to compensate for the frequency and voltage deviations caused by the first control of each distributed generation unit, and to wait to obtain the local measurement of each distributed generation unit at the next moment.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the steps of the method of claim 1.