A Frequency Optimization Method for Gas-Electricity Coupled System Considering DoS Attacks

By introducing self-immune controllers and BP neural networks into the gas-electric coupling system, the robustness of the frequency control method under DoS attack is solved, and the frequency adjustment effect with small frequency deviation and fast recovery is achieved, which improves the stability and control accuracy of the system.

CN120185008BActive Publication Date: 2025-08-01SICHUAN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510624230.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-05-15
Publication Date
2025-08-01
Estimated Expiration
2045-05-15

AI Technical Summary

Technical Problem

In the prior art, the frequency control method of gas-electric coupling systems is difficult to meet the accuracy and time requirements of modern power grid frequency regulation, especially when facing a denial of service (DoS) attack, the robustness is poor, resulting in instability in the system frequency.

Method used

The frequency response model of the gas-electric coupling system is constructed by using an autoimmune controller (ADRC) combined with a BP neural network, and the frequency deviation is reduced through ADRC control and the frequency stability is quickly restored, and further optimization is carried out in combination with the BP neural network.

Benefits of technology

Under load disturbance and DoS attack, the frequency deviation extreme value is small and the recovery time is faster, which improves the robustness and frequency control accuracy of the gas-electric coupling system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120185008B_ABST
    Figure CN120185008B_ABST
Patent Text Reader

Abstract

The present invention discloses a frequency optimization method for a gas-electricity coupled system considering DoS attacks, which relates to the field of energy technology. The optimization method includes: constructing a gas-electricity coupled system model and a DoS attack model; the gas-electricity coupled system model includes a power-frequency deviation model, a prime mover model, a governor model, and an energy storage model; based on the gas-electricity coupled system model and the DoS attack model, constructing a frequency response model of the gas-electricity coupled system; connecting ADRC control to the frequency response model of the gas-electricity coupled system, and realizing the frequency optimization of the gas-electricity coupled system by reducing the frequency deviation. The optimization method can, through ADRC control, enable the gas-electricity coupled system to meet the accuracy requirements and timeliness requirements of frequency regulation when suffering from load disturbances and DoS attacks, that is, to achieve frequency regulation with a smaller extreme value of frequency deviation and a faster recovery time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of energy, and particularly to a frequency optimization method for a gas-electricity coupling system considering DoS attacks. Background Art

[0002] The power-to-gas (P2G) technology in the gas-electricity coupling system can convert the surplus wind power during the low-load period into natural gas and work in coordination with gas turbines. The gas turbines use combined heat and power generation technology to generate electricity during the peak period, realizing the coupling of the gas system and the electric system. The gas-electricity coupling system integrates the electric and gas systems through advanced information and communications technology (ICT) to achieve coordinated control and collaborative optimization of multiple energy systems. The application of advanced ICT, complex control systems, and the coupling of multiple energy flows have promoted the integrated energy system to form a new type of cyber-physical system, namely the integrated energy cyber-physical system (IECPS). The digital platform is the core of the integrated energy system. Through this platform, the gas-electricity coupling system can achieve information interaction among various links, enabling the coordinated operation of energy production, transmission, consumption, and storage. In addition, the flow of different energies and the interaction of various data are also realized. Therefore, the openness of the gas-electricity coupling system has also increased, the participating entities have gradually diversified, and the data has become more abundant. On the other hand, the high degree of coupling between the information side and the physical side has greatly increased the network security risks faced by the IECPS.

[0003] Network attacks are highly concealed and have a relatively low attack cost. Although they cannot directly damage physical devices, they can cause the physical system to become unstable or power outages by interfering with the operation of the information side, thus having a serious impact on political stability and social economy. Therefore, it is of great significance to study the frequency optimization problem of the gas-electricity coupling system. Moreover, load frequency control (LFC) is one of the important means for regulating frequency in the power system. Since the traditional PID (Proportional Integral Derivative) control algorithm is stable, has high control accuracy, and is easy to implement, LFC mostly uses the classical PID control. However, the PID control is sensitive to external disturbances and has poor robustness, making it difficult to meet the current power grid frequency regulation requirements.

[0004] A Denial of Service (DoS) attack is a malicious network attack where an attacker disrupts the operation of a computer network or communication system by sending a large number of invalid messages, aiming to sabotage the normal operation of the computer network or communication system. For a gas-electricity coupling system, a DoS attack poses serious risks, as both the power grid frequency and the grid economy may be affected. The attacker's target is often the communication infrastructure essential for distributed control. By blocking the communication network with invalid messages, the exchange of information and control signals between system components is disrupted.

[0005] Currently, research on DoS attacks in gas-electricity coupling systems mainly proceeds from two perspectives. One is from the perspective of DoS attackers, aiming to design the optimal strategy to improve the attack success rate, focusing on seeking more effective and resource-consuming less attack strategies and exploring the problem of power system state estimation. The other is from the perspective of system defense, proposing robust strategies against network attacks. For example, a new type of distributed controller definition with the ability to resist DoS attacks is provided, which can reduce the interference of DoS attacks on the stable operation of the system. In addition, methods such as event-triggered control and repeated games are widely used to enhance the robustness of the system against DoS attacks. Currently, most research on DoS attacks is based on power systems, but the structure and operation complexity of gas-electricity systems far exceed those of traditional power systems. Therefore, hackers launching attacks on this system need to adopt more complex and targeted strategies according to the specific system model.

[0006] The frequency control optimization method is one of the key points in the research of gas-electricity coupling systems. Frequency is an important index for evaluating the power quality in gas-electricity coupling systems. Power generation equipment and electrical equipment in the power system are vulnerable to frequency fluctuations. In severe cases, the entire gas-electricity coupling system may also collapse. In recent years, with the increasing proportion of equipment such as power-to-gas in microgrids, while the coupling between the natural gas system and the electrical system is enhanced, the reliability of the gas-electricity coupling system is also reduced. When the gas system is under a DoS attack, the transmission of natural gas pipelines decreases, and the insufficient gas supply leads to a rapid reduction in the output of gas turbines, thus posing a threat to the safe and stable operation of the microgrid.

[0007] LFC is one of the important means to regulate the frequency in gas-electricity coupling systems. It balances the frequency stability between the power generation side and the user demand side by continuously adjusting the output of each energy source. The traditional PID control algorithm has high stable control accuracy and is easy to implement, but its controller parameters are difficult to determine, and the response speed is slow, making it difficult to meet the accuracy requirements and timeliness requirements of frequency regulation in current gas-electricity coupling systems. Summary of the Invention

[0008] To solve the above technical problems existing in the prior art, the present invention aims to provide a frequency optimization method that can meet the current power grid frequency regulation requirements and is applied to the gas-electricity coupling system.

[0009] Specifically, the present invention provides a frequency optimization method for a gas-electricity coupling system considering DoS attacks. The technical solution includes the following steps:

[0010] Step S1: Construct a gas-electricity coupling system model and a DoS attack model;

[0011] The gas-electricity coupling system model includes a power-frequency deviation model, a prime mover model, a governor model, and an energy storage model;

[0012] Step S2: Based on the gas-electricity coupling system model and the DoS attack model, construct a gas-electricity coupling system frequency response model;

[0013] Step S3: Connect the ADRC (Active Disturbance Rejection Control) control to the gas-electricity coupling system frequency response model, and achieve frequency optimization of the gas-electricity coupling system by reducing the frequency deviation.

[0014] Compared with the prior art, the technical solution provided by the present invention can, through ADRC control, enable the gas-electricity coupling system to meet the accuracy requirements and timeliness requirements of frequency regulation when suffering from load disturbances and DoS attacks, that is, achieve frequency regulation with a smaller extreme value of frequency deviation and a faster recovery time. Brief Description of the Drawings

[0015] Figure 1 It is a schematic flow chart of the gas-electricity coupling system frequency control method in an embodiment of the present invention.

[0016] Figure 2 It is a schematic structural diagram of the gas-electricity coupling system.

[0017] Figure 3 It is a schematic diagram of the frequency control principle in the prior art.

[0018] Figure 4 It is a schematic diagram of the frequency response model of a gas turbine in an embodiment of the present invention.

[0019] Figure 5 It is a schematic diagram of the energy storage frequency response model in an embodiment of the present invention.

[0020] Figure 6 It is a schematic diagram of the DoS attack model in an embodiment of the present invention.

[0021] Figure 7 It is a schematic diagram of the gas-electricity coupling system frequency response model considering DoS attacks in an embodiment of the present invention.

[0022] Figure 8 It is a schematic diagram of the structure of the second-order ADRC control.

[0023] Figure 9 It is a schematic diagram of the model of neurons in the BP neural network.

[0024] Figure 10 It is a schematic diagram of the structure of the BP neural network.

[0025] Figure 11 It is a curve graph of the output power of photovoltaic and wind power in an embodiment of the present invention.

[0026] Figure 12 It is a curve graph of the random load power in an embodiment of the present invention.

[0027] Figure 13 It is a schematic diagram for comparing the frequency optimization effects under PID control and ADRC control in an embodiment of the present invention.

[0028] Figure 14 It is a schematic diagram of the training result of the BP neural network in an embodiment of the present invention.

[0029] Figure 15 It is a schematic diagram of the frequency optimization effect of the ADRC control combined with the BP neural network in an embodiment of the present invention. Detailed implementation manners

[0030] Hereinafter, the technical solutions proposed by the present invention will be further elaborated in detail in conjunction with embodiments and drawings.

[0031] Embodiment 1:

[0032] The PID control method is relatively sensitive to external disturbances and has poor robustness, making it difficult to meet the requirements of modern power network frequency modulation. Therefore, it is urgent to seek new control methods to address the challenges posed by DoS attacks to the frequency stability of the gas-electricity coupling system. Compared with the PID controller, the differentiation in the active disturbance rejection controller has the effect of suppressing "noise" rather than amplifying it. Therefore, compared with the PID controller, the ADRC control is insensitive to external disturbances. The method of introducing ADRC control performs better when the gas-electricity coupling system is subjected to small disturbances and can be used to improve the robustness of the power system. Currently, there is a lack of relevant research on the ADRC control in the LFC direction of the gas-electricity coupling system.

[0033] As Figure 1 shown, the present invention introduces ADRC control into LFC and provides a frequency optimization method for the gas-electricity coupling system considering DoS attacks. The overall scheme is as follows:

[0034] First, model the frequency response of the gas-electricity coupling system and the DoS attack. Then, optimize the frequency of the gas-electricity coupling system through ADRC control and obtain relevant frequency data. Further, use the frequency data to calculate the input and output of the neurons in the hidden layer and output layer of the neural network, calculate the error, and correct the weights and thresholds according to the error. If all historical data has not been trained or the error has not reached the set threshold, continue training; otherwise, the training ends.

[0035] 1. Problem description:

[0036] In modern gas-electricity coupling systems, the proportion of renewable energy represented by wind energy and solar energy is gradually increasing. Although it alleviates the pressure of energy conservation and emission reduction, the volatility brought by renewable energy will affect the frequency stability of the gas-electricity system. As Figure 2 shown, it can be seen that the current typical gas-electricity coupling system mainly includes energy storage batteries, gas turbines, wind and solar power generation units, and loads.

[0037] Maintaining the frequency stability of the gas-electricity system is an important part of the system control task. Frequency stability essentially controls the active power balance between the power generation side and the load side to achieve the purpose of stable frequency. The main method for LFC to achieve frequency stability is through the Automatic Generation Control (AGC) method, which maintains the interchange power of the inter-area tie line at a predetermined value to achieve the stable operation of the system. The basic principle of LFC is as Figure 3 shown, and the adjustment process is as follows:

[0038] (1) When there is a load disturbance in the power system, the system frequency fluctuates and the tie line power deviates from the planned value;

[0039] (2) According to the collected frequency deviation of the gas-electricity coupling system and the interchange power deviation signal of the tie line, calculate the Area Control Error (ACE), then obtain a signal through the controller, and finally distribute the signal to each frequency modulation power source in a certain proportion;

[0040] (3) The frequency modulation power source adjusts its output according to the received frequency modulation command, completes the frequency modulation task, and maintains frequency stability.

[0041] The DoS attack situation of the gas-electricity coupling system generally attacks devices such as controllers and sensors in the gas-electricity coupling system. Such attacks can cause physical devices to stop working, unable to operate normally, and are not under system control, unable to ensure the security of the gas-electricity system.

[0042] In this embodiment, the specific scenario considered is that an attacker attacks the natural gas network in the gas-electricity coupling system, resulting in a decrease in the natural gas transmission volume and a decrease in the input volume of the gas turbine. Therefore, the output active power decreases, causing an active power imbalance between the power generation side and the load side, and leading to fluctuations in the microgrid frequency.

[0043] 2. Frequency Response Modeling of Gas-Electricity Coupling System Considering DoS Attack:

[0044] 2.1 Power Deviation and Frequency Deviation Model;

[0045] Construct a relationship between the power difference and frequency difference of the generator and the load:

[0046] ;

[0047] In the formula, t is the time, Δ P

[0053] , t , s , , L , t ,

[0050] , , t , , s , P , D , m ,

[0052] ,

[0047] , H , s , s , t ,

[0049] , s , t , , L , P , ,

[0046] , f , , , P ,

[0048] , , P , m , t , s ,

[0051] , <00,00154>, t , , f ( t ) is the change in the output power of the generator at t time; Δ P L ( t ) is the change in the load power at t time; H is the inertia coefficient; Δ f ( t ) is the frequency deviation of the gas-electricity coupling system at t time; D is the damping coefficient of the load;

[0048] Perform Laplace transform to obtain the relationship:

[0049] ;

[0050] In the formula, s is the Laplace operator, Δ P m ( s ) is the s domain expression of the change in the output power of the generator, Δ P L ( s ) is the f ( s ) is the s domain expression of the frequency deviation of the gas-electricity coupling system;

[0051] Calculate the power-frequency deviation model, and the formula is as follows:

[0052] ;

[0053] In the formula, It is the transfer function between the power difference and the frequency difference of the generator and the load.

[0054] 2.2 Prime mover model;

[0055] (1) Steam turbine model:

[0056] When the governing valve opens or closes, due to the certain space between the governing valve and the first-stage nozzle, the mechanical power of the steam turbine lags behind the change of the valve opening, that is, the steam capacitance effect. The steam capacitance effect can be represented by a first-order inertia link, and the formula is as follows:

[0057] ;

[0058] In the formula, is s the transfer function between the change in the mechanical power output of the steam turbine and the change in the valve opening in the is the s domain expression of the change in the mechanical power output of the steam turbine, is the s domain expression of the change in the valve opening, K t is the gain, T t is the steam capacitance time constant.

[0059] For a reheating steam turbine, the delay of the reheating section also needs to be considered. Its transfer function is shown in the following formula:

[0060] ;

[0061] In the formula, K r is the reheating coefficient, generally 0.2 - 0.3 times the total power of the steam turbine, T r is the reheating time constant, generally taken as 10 s.

[0062] In this embodiment, to simplify the model, a non-reheating steam turbine is used to construct the prime mover model.

[0063] (2) Gas turbine model:

[0064] The gas turbine is an important part of the gas-electricity coupling system. It can generate electricity by using the high-temperature heat energy released by natural gas combustion. After the waste heat generated by power generation is recycled, it can also meet the demand of the heat load. Therefore, the gas turbine is the best method to provide clean, reliable and high-quality power generation.

[0065] The transfer function of the gas turbine is as follows:

[0066] ;

[0067] In the formula, c g and b g are the time constants of the valve positioner, X c is the lead time constant of the governor, Y c is the lag time constant of the governor, T CR is the combustion reaction time delay of the gas turbine, T F is the fuel system time constant, T CD is the time constant of the compressor discharge.

[0068] 2.3 Governor model;

[0069] To achieve the goal of controlling the speed and load of the water turbine or steam turbine, the governor controls the guide vane or inlet valve by feedback of the speed deviation. Its main components include a measurement link, an amplification link, and an execution link, etc. The transfer function is shown as follows:

[0070] ;

[0071] In the formula, is the transfer function between the governor gain and the governor time constant, K c is the governor gain, T c is the governor time constant.

[0072] The frequency response models of the prime mover and the governor in the gas-electric coupling system are as Figure 4 shown. Subtract the difference between the active power deviation Δ P ( s ) of the gas-electric coupling system and the load from the product of the frequency deviation Δ f ( s ) and the reciprocal of the droop coefficient R as the input of the governor model; use the output of the governor model as the input of the gas turbine model; impose a power generation constraint on the output of the gas turbine model to obtain the change in the active power output of the gas turbine Δ P g ( s ); use the frequency deviation Δ f ( s ) as the input of the energy storage model; impose a power generation constraint on the output of the energy storage model to obtain the change in the energy storage power output Δ P B ( s ).

[0073] Among them, the regulation coefficient R shows the speed regulation carried out due to the action of the governor. The power generation rate constraint is a non-linear saturation phenomenon, which occurs due to the physical limitations of the generator. When the load disturbance is large, it is difficult for the generator's output power to match the current load demand, resulting in an inability to provide sufficient change rate.

[0074] 2.4 Energy storage model;

[0075] The auxiliary frequency regulation function of energy storage is mainly achieved by the converter exchanging active power with the power grid. Energy storage balances the power generation supply and load demand of the power system through its charge and discharge functions, thereby performing frequency regulation and suppressing external interference.

[0076] Energy storage devices in modern gas-electricity coupling systems mainly include lithium batteries and flywheel energy storage, etc. These devices have the advantages of fast response speed, high control accuracy, and strong frequency regulation ability. When the frequency fluctuates in the gas-electricity coupling system, they can quickly carry out frequency regulation work and can accurately track the active power changes of the load and the active power changes of the generator set output. The system frequency Δ f and the change amount Δ P B of the power output of the battery energy storage device are related as shown in the following formula:

[0077] ;

[0078] In the formula, K B is the energy storage gain, T b is the energy storage time constant, usually K B is taken as 1.

[0079] Correspondingly, the energy storage frequency response model is as shown in Figure 5 , and the relationship between the corresponding constructed frequency deviation Δ f ( s ) and the change amount Δ P B ( s ) is related as shown in the following formula:

[0080] ;

[0081] In the formula, is the energy storage gain K B and the transfer function between the energy storage time constant T b .

[0082] 2.5 DoS attack model;

[0083] As Figure 6 shown, this embodiment considers two cases: when the system is in the DoS attack period and when it is not in the DoS attack period. Define to represent the moment when the m th attack is launched, is the sequence of DoS attack launch times, is the duration of the m th attack, , then is the time period of the m th DoS attack, is the duration from the end of the m th attack to the start of the m +1th attack. Therefore, we can obtain .

[0084] For , , the time range during which the gas-electricity coupling system is under DoS attack and the gas turbine cannot operate normally, i.e., the total duration of the DoS attack is:

[0085] ;

[0086] The time range during which the gas-electricity coupling system is not under DoS attack and can operate normally is:

[0087] .

[0088] Define to represent the number of attacks on the system during the time period , then the attack frequency is shown as follows:

[0089] ;

[0090] represents the total duration of the DoS attack on the gas-electricity coupling system, then the attack length ratio r is shown as follows:

[0091] .

[0092] 2.6 Frequency response model of gas-electricity coupling system considering DoS attack;

[0093] This embodiment is directed to the microgrid of the gas-electricity coupling system. As Figure 7 shown, a dynamic frequency response model of this system is established. This model consists of the change in the power of different generator sets Δ P gi, the change in battery energy storage power Δ P bess , the change in flywheel energy storage power Δ P fly_wheel , the change in wind power Δ P wind , the change in photovoltaic power Δ P solar and the change in random load Δ P load . Among them R is the droop coefficient of the governor, H and D are respectively the equivalent inertia constant and load damping coefficient of the gas-electricity coupling system; G ci ( s ) and G fi ( s ) are respectively the transfer functions of the i rd governor and the i th generator; T bess and T fly_wheel are respectively the time constants of battery energy storage (Battery Energy Storage System, BESS) and flywheel energy storage.

[0094] Figure 7 . In x i , it represents the intensity of the DoS attack suffered by the i th unit. Its value is a number in [0, 1]. When there is no DoS attack, its value is 1. When the attacker conducts the maximum-intensity attack, its value is 0, that is, completely cutting off the active power output of the generator set. The formula is as follows:

[0095] ;

[0096] . In the formula, is the change in the active power output of the steam turbine under the DoS attack.

[0097] Add the change in the active power output of each steam turbine under the DoS attack, the change in the output power of each energy storage (including the change in battery energy storage power Δ P bess , the change in flywheel energy storage power Δ P fly_wheel ), the change in wind power and the change in photovoltaic power. After subtracting the change in random load from the obtained sum, it is used as the input of the power-frequency deviation model to obtain the frequency deviation Δ f (s )。 Then, take the frequency deviation Δ f ( s ) as the input of the frequency response models of the prime mover and the governor, and update and iterate the change in the active power output of the steam turbine under the DoS attack through ADRC control .

[0098] 3. Frequency control method:

[0099] 3.1 Basic principle of ADRC control;

[0100] Nonlinear ADRC (NLADRC) is improved on the basis of PID. Among them, estimating the total disturbance of the controlled system is realized by an extended state observer, obtaining the differential signal is realized by a tracking differentiator. At the same time, to reduce the large overshoot of the system caused by external disturbances, this controller also arranges the transient process, and finally improves the control effect by nonlinear state error feedback control.

[0101] Suppose there is a second-order object:

[0102] ;

[0103] In the formula, <s is the output; is the first derivative of the output; is the second derivative of the output; refers to the external disturbance; then refers to the total disturbance considering internal and external disturbances; is an intermediate calculation quantity; is a constant representing the relative gain.

[0104] By selecting the state variables: , transform the above equation into a state equation, and the formula is as follows:

[0105] ;

[0106] In the formula, x 1 and x 2 are both state variables.

[0107] The advantage of ADRC control is that it does not require measuring external disturbances and does not require an accurate mathematical model. Therefore, the simple and practical ADRC control is very suitable as a frequency optimization method for the gas-electricity coupling system.

[0108] The Tracking Differentiator (TD) in ADRC control can arrange a transition process to obtain a reliable differential signal, which can also reduce the large overshoot caused by disturbances compared to PID control.

[0109] In terms of control effect, ADRC uses the Nonlinear State Error Feedback Law (NLSEF) to improve it; to be able to observe the total disturbance of the system in real time, ADRC control uses the Extended State Observer (ESO) to achieve it. The structure of this ADRC controller is as Figure 8 shown.

[0110] (1) Tracking Differentiator TD (Tracking-Differentiator):

[0111] ADRC control uses the TD link to effectively reduce the initial error. When the system parameters are appropriate, the system can achieve fast tracking of the target with basically no overshoot. The expression of TD is as follows:

[0112] ;

[0113] In the formula, k represents the k th moment, v represents the input signal of the tracking differentiator, is equal to v , is v 's first derivative, h is the sampling period, , are the function control quantities, can be an integer multiple of the object sampling period .

[0114] The definition of the fhan function is as follows:

[0115] ;

[0116] In the formula, y is the output of the controlled system, r 1 is the relative order of the controlled system, d , d 0, a 0, a are all intermediate calculation quantities.

[0117] (2) Extended State Observer ESO (Extended State Observer):

[0118] To improve the robustness of the controlled system, the ESO expands the disturbance of the output of the controlled system into state variables and observes them in real time. In addition, the ESO also has the function of estimating the disturbance of the controlled system in real time, including model uncertainty and external disturbance. The ESO is independent of the generated disturbance model and can realize the observation of the disturbance without measuring the disturbance, which has strong practicability. The discrete expression of the ESO is as follows:

[0119] ;

[0120] In the formula, and are the estimated values of the state variables and of the nonlinear system respectively. The variable is the expanded state, e is an intermediate calculation quantity, representing the difference between the estimated value and the actual value, is the linear interval length, , , represent preset parameters. The fal function is defined as:

[0121] ;

[0122] Among them, is an adjustable parameter.

[0123] (3) Nonlinear error feedback control law NLSEF (Nonlinear Law State Error Feedback):

[0124] The NLSEF is composed of the state feedback by the ESO and the output of the TD. Its expression is:

[0125] ;

[0126] In the formula, e 1, e 2, u 0 are intermediate calculation quantities, k 1 and k 2 are preset parameters. u The algorithm formula of

[0127] is equivalent to the nonlinear combination of proportional and integral in PID and can quickly track the preset value. v Specifically, in the present invention, u is the expected value of the frequency deviation, set to 0; yThree data are included for the estimation of the system state, namely the actual frequency deviation of the gas-electricity coupling system, the differential of the frequency deviation, and the integral of the frequency deviation. The ADRC control estimates the frequency state of the gas-electricity coupling system, calculates the error between the estimated value and the set value, and then obtains the ACE signal of the gas-electricity coupling system through the nonlinear error feedback control law, ultimately achieving the purpose of frequency stability.

[0128] 3.2 BP (Back Propagation) neural network;

[0129] Model-free frequency control is achieved using the data after ADRC control; the BP neural network presents the law of input data by iterating parameters and no longer requires obtaining a mathematical model as in traditional methods. The model of the BP neural network consists of neurons that can stimulate each other, and its neuron model structure is as Figure 9 shown.

[0130] Figure 9 In p (1)~ p ( n ) represents the n inputs of the neuron, w (1,1)~ w (1, n ) represents the connection weights input to the neuron, a is an intermediate variable, b is the threshold, f is the activation function, y 1 is the output of the neuron. The activation function, also known as the squashing function or transfer function, is used to limit the output amplitude of the neuron.

[0131] Output of the neuron:

[0132] ;

[0133] In the formula, j is the serial number of the neuron input.

[0134] A complete BP neural network consists of three parts: the input layer, the output layer, and the hidden layer. Among them, the number of neurons in the input layer and the output layer should be determined according to the content to be predicted and the number of training samples; the hidden layer can be one layer or multiple layers. As Figure 10 shown, it is a multi-layer BP network. The number of hidden layer nodes is usually selected by the trial-and-error method.

[0135] 4. Case study:

[0136] 4.1 Introduction of the case;

[0137] In this embodiment, the Simulink platform is used to build Figure 7The dynamic frequency response model of the gas-electricity coupling system shown

[0138] This model consists of a gas turbine, a steam turbine, a flywheel energy storage device, a battery energy storage device, wind power and photovoltaic equipment, and a random load. Among them, the capacity of the gas turbine is 375 MW, and the capacity of the steam turbine is 600 MW. The base value of the load is 1500 MW, and the rated frequency of the system is 50 Hz.

[0139] Two generators are modeled separately, the governor is modeled according to, the flywheel and the battery energy storage device are both modeled according to the formula, and the parameter selection is shown in Table 1.

[0140] Table 1 System parameter values

[0141] .

[0142] The output power of wind power and photovoltaic and the random load power are respectively as Figure 11 and Figure 12 shown. It can be seen from Figure 12 that the load has two fluctuations at time 170 s and 190 s. Under the above system, it is assumed that the attacker conducts a DoS attack on the natural gas network at time 250 s. This attack can be regarded as a switching signal, that is, the natural gas transmission is stopped. At this time, the gas turbine has no input and stops working.

[0143] In this embodiment, the PID control and the ADRC control methods are respectively used to optimize the frequency of the same gas-electricity coupling system, and the simulation results are as Figure 13 shown.

[0144] Figure 13 is the change of the system frequency deviation when the system is disturbed and the traditional PID and ADRC controls are adopted. It can be seen that the disturbance occurs during the DoS attack and the two load fluctuations. For the former, the extreme values of the frequency deviation are -0.036 Hz and 0.014 Hz during the load fluctuation, and the extreme value of the frequency deviation is 0.032 Hz during the DoS attack; for the latter, the extreme values of the frequency deviation are -0.022 Hz and 0.011 Hz during the load fluctuation, which are reduced by 38.9% and 21.4% compared with the frequency deviation under the PID control. The extreme value of the frequency deviation during the DoS attack is 0.020 Hz, which is reduced by 37.5% compared with the PID control. It can be concluded that ADRC-LFC can reduce the dynamic extreme value of the frequency during the disturbance more effectively than PID-LFC, which is beneficial to the frequency recovery of the gas-electricity coupling system.

[0145] Meanwhile, during PID control, the recovery times of the system under load fluctuations are 0.127 s and 0.133 s, and the recovery time under DoS attack is 0.132 s; during ADRC control, the recovery times under load fluctuations are 0.056 s and 0.059 s, which are 55.9% and 55.6% shorter than those during PID control respectively, and the recovery time under DoS attack is 0.070 s, which is 47.0% shorter than that during PID control. It can be concluded that ADRC-LFC can track disturbances faster than PID-LFC and restore the stability of the frequency of the gas-electricity coupling system more quickly, which is beneficial to the safety and stability of the system.

[0146] In summary, the frequency fluctuation of the gas-electricity coupling system using the ADRC frequency optimization method is smaller than that using the PID frequency optimization method, the extreme value of the frequency deviation after being disturbed is smaller, the recovery time is faster, and the control performance is more excellent. Therefore, the ADRC control method can greatly improve the robustness of the gas-electricity coupling system.

[0147] 4.2 Frequency control optimization effects of ADRC and BP neural network and their comparison;

[0148] The BP neural network is introduced into the ADRC control algorithm, that is, the BP neural network is used to learn the frequency data optimized by ADRC control, and then the learned model is applied to the gas-electricity coupling system under DoS attack in the previous section to optimize its frequency control.

[0149] In this embodiment, a three-layer feedforward neural network is constructed, including an input layer, a hidden layer and an output layer. The input layer contains 3 neurons, corresponding to the frequency deviation, the differential of the frequency deviation and the integral of the frequency deviation respectively; the hidden layer contains 5 neurons; the output layer contains 1 neuron, corresponding to the power generation control signal of the unit. The activation functions of the input layer, the hidden layer and the output layer adopt the logarithmic sigmoid function (logsig), the hyperbolic tangent function (tansig) and the linear function (purelin) respectively. The training function adopted is the Levenberg-Marquardt algorithm, which has a fast convergence speed. The number of training times is 1000 times, and the training target error is 1×10-12. Before the training starts, the weights and biases of the network are randomly initialized to ensure that the network starts learning from different starting points.

[0150] The obtained frequency response data (frequency deviation, differential of frequency deviation and integral of frequency deviation) and target output data (power generation control signal of the unit) are input into the network for training. The weights and biases of the network are continuously adjusted through the backpropagation algorithm to minimize the error between the network output and the target output. During the training process, the network is gradually optimized by the gradient descent method until the preset training target error or the maximum number of training times is reached. The training results are as Figure 14As shown, the error corresponding to the best training performance is 0.061082 in the 1000th round.

[0151] After the training is completed, the BP neural network is used in the gas-electricity coupling system. Figure 15 When the system is disturbed, the following shows the change of the frequency deviation of the system when using ADRC and BP neural network control. When using BP neural network control, the extreme value of the frequency deviation of the system during the first load disturbance is -0.001Hz, and the extreme value of the frequency deviation during the second load disturbance is -0.004Hz, which are reduced by 95.5% and 63.6% respectively compared with the extreme values during ADRC control; during DoS attack, the extreme value of the frequency deviation generated by the system is 0.022Hz, which is increased by 10.0% compared with the extreme value during ADRC control.

[0152] At the same time, after the system is disturbed for the first time, its recovery time is 0.029s, which is shortened by 48.2% compared with the recovery time during traditional ADRC control. The recovery time after the second disturbance is 0.026s, which is shortened by 55.9% compared with traditional ADRC control; the recovery time of the system after being disturbed by DoS is 0.064s, which is 8.5% faster than ADRC control and is almost the same as the recovery time during ADRC control.

[0153] It can be seen that when the system receives small disturbances, the control effect of the BP neural network can maintain the stability of the system frequency faster and more stably compared with traditional ADRC. When the system is subject to large disturbances, the control effects of the BP neural network and traditional ADRC are comparable.

[0154] From the embodiments and the attached drawings, it can be seen that the present invention establishes a gas-electricity coupling frequency control model considering load disturbances and DoS attacks, taking into account the huge impact of random loads and DoS attacks on the frequency of the gas-electricity coupling system; a second-order ADRC control method for the frequency control of the gas-electricity coupling system, and designs a controller model of ADRC, which can effectively cope with the impact of load disturbances and DoS attacks on the system. Further, on the basis of optimizing ADRC control, a BP neural network is introduced to learn and fit the data set, which can achieve precise control of the frequency of the gas-electricity coupling system.

[0155] In summary, compared with the prior art, the technical solution provided by the present invention can, through ADRC control, enable the gas-electricity coupling system to meet the accuracy requirements and timeliness requirements of frequency regulation when suffering from load disturbances and DoS attacks, that is, achieve frequency regulation with a smaller extreme value of frequency deviation and a faster recovery time. Further, on the basis of ADRC control, a BP neural network is introduced to control the frequency of the gas-electricity coupling system, which can provide a comparable control effect during large disturbances; during small disturbances, it can provide a more excellent control effect to ensure precise control of the frequency of the gas-electricity coupling system.

Claims

1. A frequency optimization method for a gas-electricity coupling system considering DoS attacks, characterized in that, It includes the following steps: Step S1: Construct a gas-electricity coupling system model and a DoS attack model; The gas-electricity coupling system model includes a power-frequency deviation model, a prime mover model, a governor model, and an energy storage model; Step S2: Based on the gas-electricity coupling system model and the DoS attack model, construct a frequency response model of the gas-electricity coupling system; Step S3: Connect the ADRC control to the frequency response model of the gas-electricity coupling system, and achieve frequency optimization of the gas-electricity coupling system by reducing the frequency deviation; Step S2 specifically includes: Step S21: (1) Based on the prime mover model and the governor model, construct the frequency response model of the prime mover and the governor, and the formula is as follows: where ΔP g (s) is the s-domain expression of the change in the active power output of the gas turbine, ΔP(s) is the s-domain expression of the active power deviation between the gas-electricity coupling system and the load, Δf(s) is the s-domain expression of the frequency deviation of the gas-electricity coupling system, R is the droop coefficient, G c (s) is the transfer function between the governor gain and the governor time constant, G g (s) is the transfer function of the gas turbine; (2) Based on the energy storage model, construct an energy storage frequency response model, and the formula is as follows: △P B (s) = G B (s) × △f(s); where ΔP B (s) is the s-domain expression of the change in the energy storage output power, and G B (s) is the transfer function between the energy storage gain K B and the energy storage time constant T b ; Step S22: (1) For each generator set in the gas-electricity coupling system, according to the frequency response model of the prime mover and governor and the DoS attack model, calculate the change amount ΔP′ g (s) of the active power output by the steam turbine under DoS attack. The formula is as follows: ΔP′ g (s) = (1 - r) × ΔP g (s); In the formula, r is the attack length ratio; (2) For each energy storage in the gas-electricity coupling system, calculate the change in the output power of the corresponding energy storage according to the energy storage frequency response model; Step S23: Add the change in the active power output of the steam turbine under each DoS attack, the change in the output power of each energy storage, the change in the wind power, and the change in the photovoltaic power, subtract the change in the random load from the obtained sum, and use it as the input of the power-frequency deviation model to obtain the frequency deviation Δf(s).

2. The frequency optimization method for a gas-electricity coupling system considering DoS attacks according to claim 1, wherein, The construction of the gas-electricity coupling system model includes: (1) Construct a power-frequency deviation model, specifically: Construct a relational expression between the power difference and the frequency difference between the generator and the load: where t is the time, and ΔP m (t) is the change in the output power of the generator at time t; ΔP L (t) is the change in the load power at time t; H is the inertia coefficient; d is the differential symbol; Δf(t) is the frequency deviation of the gas-electric coupling system at time t; D is the damping coefficient of the load; Perform Laplace transform to obtain the relational expression: △P m (s)-△P L (s) = 2HsΔf(s) + DΔf(s); where s is the Laplace operator, and ΔP m (s) is the s-domain expression of the change in the output power of the generator, and ΔP L (s) is the frequency-domain expression of the change in the load power, and Δf(s) is the s-domain expression of the frequency deviation of the gas-electricity coupling system; Calculate to obtain the power-frequency deviation model, and the formula is as follows: where G f (s) is the transfer function between the power difference and the frequency difference of the generator and the load; (2) Construct a prime mover model, including constructing a steam turbine model and a gas turbine model: A. Construct a steam turbine model, specifically construct a steam turbine model of a non-reheat steam turbine, and the formula is as follows: Where, G t (s) is the transfer function between the change in the turbine's mechanical power output and the change in the throttle valve opening in the s-domain, ΔP t (s) is the s-domain expression of the change in the turbine's mechanical power output, ΔX t (s) is the s-domain expression of the change in the throttle valve opening, K t is the gain, T t is the steam volume time constant; B. Construct a gas turbine model, and the formula is as follows: where, G g (s) is the transfer function of the gas turbine, c g and b g are the time constants of the valve positioner, X c is the lead time constant of the governor, Y c is the lag time constant of the governor, T CR is the combustion reaction time delay of the gas turbine, T F is the fuel system time constant, T CD is the time constant of the compressor discharge; (3) Construct a governor model, and the formula is as follows: where G c (s) is the transfer function between the governor gain and the governor time constant, K c is the governor gain, and T c is the governor time constant; (4) Construct an energy storage model, and the formula is as follows: Wherein, G B (s) is the energy storage gain K B and the transfer function between the energy storage time constant T b ; where K B = 1.

3. The frequency optimization method for a gas-electricity coupling system considering DoS attacks according to claim 2, wherein If the steam turbine is a reheat steam turbine, update the steam turbine model, and the formula is as follows: Where K r is the reheat coefficient, and T r is the reheat time constant.

4. The frequency optimization method of the gas-electricity coupling system considering DoS attacks according to claim 2, characterized in that, The DoS attack model is specifically: Calculate the attack frequency F a (t0, t), the formula is as follows: where (t0, t) is the time period when a DoS attack is encountered, and N a (t0, t) is the number of attacks suffered during the time period (t0, t); Calculate the attack length ratio r, and the formula is as follows: where, Ξ a (t0, t) is the total duration of the DoS attack suffered.

5. The frequency optimization method of the gas-electricity coupling system considering DoS attacks according to claim 4, wherein Step S3 specifically includes: Use the frequency deviation Δf(s) as the input of the ADRC control to obtain a power generation control signal to control the power generation state of each generator set, so as to reduce the frequency deviation Δf(s) and achieve frequency optimization of the gas-electricity coupling system.

6. The frequency optimization method for a gas-electricity coupling system considering DoS attacks according to claim 5, characterized in that It also includes: Based on the historical data set of the ADRC control, adjust the connection weights and bias parameters of each neuron in the BP neural network through the backpropagation algorithm to reduce the error between the output of the BP neural network and the power generation control signal until the target error or the maximum number of training times is reached; Input the frequency deviation of the frequency response model of the gas-electricity coupling system to be controlled into the BP neural network, and obtain the output of the BP neural network as a new power generation control signal; The historical data set includes historical data of frequency deviation, differential of frequency deviation, integral of frequency deviation, and power generation control signal.