Distributed Control for AC Microgrids with False Data Injection Attacks and Time Delays

. Distributed control is widely used in AC microgrids to maintain frequency and voltage stability and internal power balance. However, distributed control need realizes information interaction through communication network, which makes microgrid vulnerable to network attack. A distributed control strategy based on consensus theory is proposed in this paper to enhance the resilience of microgrid to attack. An attack detection and localization method is designed for the false data injection attack. The Artstein’s transformation is introduced to process the delay data and the performance of controller under delay can be enhanced. An isolated island AC microgrid model was built in Simulink platform for simulation to verify the performance of the controller. The simulation results verified the effectiveness of the control strategy against false data injection attack and time delay.

delay system into an ordinary differential system, which can effectively simplify the stability analysis and reduce the impact of delay on the controller performance. This paper proposes a new hierarchical cooperative control strategy under the premise of fully considering false data injection attack and communication delay.
The organization of this paper is as follows. The attack detection and localization method and the processing method of delayed data are present in section II. Section III presents the hierarchical control structure. With this, we present the case study that was carried out in section IV, ending with section V with the conclusions.

Conensus Control
The combination of distributed generation, LCL filter, inverter and load in the microgrid is labeled as an agent. The communication data of the i-th agent is marked as � ( ( . The virtual leader can transmit communication data to other agents, and the leader's communication data is marked as � ( . For a multi-agent system, the leader-follower consensus is given as lim ( ) The first-order mathematical model of multi-agent system is as follows: where � ∈ � is the control input of the i-th agent.
Based on the above analysis, the communication data of each follower will be consistent with the leader's communication data through the consensus protocol which is given by where � and � are the gain of the consensus protocol.

Attack detection and location
There are two main types of cyber attacks in the microgrid, namely denial of service attacks and FDIAs. FDIA disrupts the stable state by injecting false data into communication information, and denial of service attack disrupts the stable operation of the system by interrupting the information exchange in the communication link.

1) Link attack
The communication link suffers from false data injection attack, and the communication information is injected with additional disturbance quantity. The receiver of the attacked communication link will receive the damaged information. The model of the link attack is given by where � � is the false data that the transmission information is injected; � is the attack coefficient, in the presence of false data injection, � , otherwise, � 0; � is the measurement of DG i .

2) Node attack
The malicious input acts on the attacked node. Additional false data is injected to destroy the information of the node and all neighbors of the attacked node will receive the destroyed information. The model of the node attack is given by where � � is the false data injected into the node information; � is the attack coefficient, in the presence of false data injection, � , otherwise, � 0; � is the measurement of DG i .

3) Detection and location method
In order to realize the detection of cyber attacks, according to the local neighbor tracking error we can define In the normal operation, � ( � ( ��� , Therefore, the existence of FDIA can be determined by detecting the value of � ( . The value of � ( can detect the existence of FDIA, but the localization of FDIA cannot be achieved. To achieve this goal, we define 0 is the weigh of C � . The value of C � of the node close to the attack source is small, and the location of the node attack can be realized by detecting the value of C � .
For link attacks, we define where is the number of neighbor nodes of DG i .
where ε � is a threshold set according to the microgrid.
where 0 is the weigh of T �� . In the presence of attack, �� ≠ 0 , the distance between the communication link and the attack source determines the value of �� . Link attack localization can be realized by detecting the value of T �� .

Communication time delay
The information exchange in distributed control determines the inevitability of time delay. Therefore, it is necessary to design distributed controller to improve the controller performance under the premise of considering delay. In this paper, the Artstein's transformation is introduced to transform the delay control system into an ordinary differential control system, and the stability problem can be analyzed based on the simplified system.
The application of Artstein's transformation can transform the input delay system (2) into a first-order integral system without delay which can given by The Artstein transformation can guarantee the stability of the time-delay system as long as the simplified ordinary differential control system is stable.
The consensus control after Artstein's transformation is as follows:

Primary Control
Consider an isolated AC microgrid with multiple DGs. In order to improve system performance, hierarchical coordinated control is used in the microgrid. The primary control is used to maintain frequency, voltage stability and active/reactive power distribution. The secondary control is used to eliminate the deviation caused by the primary control.
The primary control usually adopts droop theory, and the design of droop controller considers the dynamic characteristics of active and reactive power droop technology. The primary control method based on droop technology is: where � and � are the output angular frequency and voltage magnitude of the th DG, respectively; �� and �� are the frequency and voltage amplitudes of the nominal set point, respectively, which will be regulated by the secondary control; � and � are the droop coefficients of active power and reactive power, respectively; � and � are the measured active and reactive power, respectively.
Transform (16) into d-q reference frame form as where � �� and � �� are the d-axis and q-axis output voltage references, respectively.
The measured active and reactive power of DG is given by where � � is the cutoff frequency of the low pass filter.

Secondary Control
The primary control will produce deviations that make the frequency and voltage amplitude lower than their respective rated values, and the secondary control aims to eliminate the deviation. In this distributed structure, each DG's controller only needs the local information and the information of neighbor nodes to achieve the control goal, which greatly reducing the amount of communication and improving the robustness of the system.
According to the previous analysis, the input and output of the secondary frequency controller are �� and � respectively. The secondary control is to design an appropriate �� to achieve synchronization between � and the reference value.
By using feedback linearization, the derivative of (17) is obtained where �� is the designed secondary frequency controller.
In order to enhance the resilience of the microgrid against attacks and delays, a secondary frequency controller is designed as: The input of the secondary control is given by

CASE STUDY
The distributed controller is applied to the island AC microgrid with 5 DGs, and its system topology is shown in Figure 1. The system is built in Matlab-Simulink environment, and the distributed controller designed in this paper is assembled to verify its performance. The parameters of the controller are � = � = 2, � = 2.  Fig. 1 The test islanded AC microgrid with five DGs.
In order to verify the performance of the distributed controller consider attack and communication delay proposed in this paper, the following five scenarios are verified: 1) , start the secondary controller considering attack and communication delay; 2) , apply communication delay ; 3) , apply link attack; the communication link between DG2 and DG3 was attacked, generate a damaged frequency � 5 .

4)
, apply node attack; the entire controller of DG2 was hijacked and the frequency information was destroyed, generate a damaged frequency � 5 .

5)
5 , remove node attack.  The primary control is initially activated, while the secondary control is deliberately disabled. The primary control causes voltage and frequency to deviate from the nominal value. In the first scenario, the secondary control in (20) is activated at t=1s. It can be seen from Fig. 2 and Fig. 3 that the frequencies and voltages can quickly aligned to their reference values. In the second scenario, we add additional communication delays to the controller, and the controller can realize almost no fluctuation control of system frequency and voltage.
In the third scenario, the link attack can be quickly eliminated through the attack detection and localization method in the controller, and the system voltage and frequency stability can be quickly restored. The node attack in scenario 4 directly hijacks the entire controller and causing the frequency of DG2 oprating in an abnormal state. The internal physical connection of the system causes the voltages of DGs to oscillate. Although the controller cannot eliminate the node attack, it can still detect and prevent the spread of the attack in the communication network. After the node attack is eliminated in scenario 5, the system voltage and frequency gradually stabilize.

CONCLUSION
This paper proposes a distributed control strategy based on the consensus theory for voltage and frequency control of AC microgrids. The designed attack detection and location strategy can effectively realize the processing of both link and node FDIAs. The Arestein's transformation is used to transform the input delay system into an ordinary differential system to enhance the delay characteristic of the controller. The simulation results show that the distributed control method proposed in this paper can effectively detect false data injection attacks and enhance the delay characteristics, thereby improving the resilience and stability of microgrid.