Sliding Mode Observer-Based Fault-Tolerant Secondary Control of Microgrids

This paper proposes two sliding mode observer (SMO)-based fault-tolerant secondary control schemes for microgrids. The first scheme consists of a central SMO-based fault tolerant controller that uses outputs from the microgrid and estimates all states in the microgrid as well as the fault. The estimated fault is then used to reject the effect of faults on the microgrid. The second scheme is decentralised, where each distributed generator (DG) has its own SMO-based fault tolerant controller which would estimate faults affecting that DG alone, and compensate for faults in only that DG. By rejecting the effect of faults in each DG, the effect of faults on the entire microgrid can be negated. Finally, we simulate an example using both schemes, and its results verify the efficacy of the schemes for fault-tolerant secondary control of microgrids.


Introduction
A microgrid is defined as a group of loads and distributed energy resources (which include distributed generators (DGs)) operating in a controlled, coordinated manner while connected to the main grid, or while islanded [1]. The main grid would perceive the microgrid as a single element that responds accordingly when fed the appropriate control signal [2]. The structure of a microgrid gives rise to many possible configurations depending on its size and function, and the ability to operate in an islanded manner increases its resilience towards emergencies and blackouts [3]. A pertinent challenge in the control of microgrids however arises from the geographical dispersion of DGs from each other [4], as well as variations in the performance of each element, which are especially common in renewable energy-based microgrids [5][6][7]. The control of many separate elements to function as a single entity responding to input control signals is difficult, and requires innovative methods to guarantee the stability and performance of the microgrid [3,8,9].
Hierarchical control is a popular approach in the control of microgrids [10][11][12]. First formalised in the context of microgrids in [13], hierarchical control treats microgrid control as three separate control loops: primary, secondary, and tertiary control. The primary control loop adjusts the frequency and amplitude of the voltage in each DG, while secondary control compensates for the deviations in voltage amplitude and frequency, and finally tertiary control coordinates the overall power flow in and out of the microgrid [11]. Consensus-based methods were used to implement the various control loops in microgrids [7,[14][15][16][17], where each DG is treated as a node in a network, and only relies on information from its neighbouring nodes, unlike in schemes requiring full state knowledge [5,18] or the centralised schemes in [3,19]. A consensus-based scheme for current sharing and voltage regulation was proposed in [7]; the reference voltage into each DG is however assumed to be constant, which may not be realistic given that he microgrid may be subject to fluctuations in demand, and that each DG generally operates under its own varying conditions [4,6]. Another consensus-based scheme for multi-area systems was proposed in [20], which focusses on the tertiary control loop and performs sensor fault-tolerant control (FTC) using knowledge of local and neighbouring subsystem states. The scheme however relies on the secondary control loop not being affected by faults. In particular, Park et al. [14] introduced a consensus protocol-based method for secondary control in microgrids. Using the states of its neighbouring DGs, the consensus protocol ensures that the voltage amplitude and frequency of each DG follow the prescribed reference.
The control scheme in [14], however, assumes that the control signal is relayed to each DG without any corruption (any unwanted deviation in the control signal will henceforth be referred to as a fault). Recall that DGs in a microgrid can be spread far apart and also are subject to varying operational conditions [6]. These circumstances can lead to faults arising in the control of each DG [7,18,19], which can cause erroneous behaviour that can cascade into other DGs due to the consensus protocol. Hence it is important to negate the influence of these faults on the microgrid to prevent potentially damaging behaviour.
Sliding mode observers (SMOs) are a special type of observer with a discontinuous switching term that forces the estimation error for outputs to zero in finite time [21]. Furthermore, the switching term is found to contain information on the fault, which could be used to estimate the fault [22]. Then by using information of the estimated fault (such as its location, magnitude, and shape), we can overcome the effects of the fault [23,24]. SMO-based FTC was employed to reject the influence of faults on the operation of various practical systems, such as in wind turbine pitch control [25], multi-area power systems [20], and motor control for electric vehicles [26] and induction motors [27].
Motivated by the above, we propose two SMO-based fault-tolerant secondary control schemes for microgrids based on the method in [14]. The first scheme is centralised, consisting of a central SMO-based fault-tolerant controller. Outputs from the DGs (which are a subset of all states in the microgrid) are transmitted to a central SMO, which estimates all states and faults in the microgrid. The SMO-based controller then uses the estimated fault to negate the effects of all faults in the entire microgrid. The second scheme is decentralised, where each DG has its own SMO-based fault-tolerant controller. Each SMO would receive the states of its respective DG and its connected neighbours to estimate faults affecting that DG alone. Based on the estimated fault, the SMO-based fault-tolerant controller would reject faults affecting its respective DG. By rejecting the faults acting on each DG, the effect of faults on the entire microgrid is negated. The main contributions of the presented work are hence summarised as follows: • Two observer-based fault-tolerant secondary control schemes for a faulty microgrid are presented. Both schemes use a SMO to estimate faults affecting the microgrid (which were not considered in [4,6,[10][11][12][13][14][15][16][17]), and negate the effect of the faults on the microgrid. • The first scheme uses a single, central SMO. Based on a subset of all states in the microgrid, the SMO estimates the remaining states and estimates all faults in the microgrid. The fault compensator then uses the estimated faults to negate the faults affecting the microgrid. • The second scheme uses a SMO for each DG. Based on states available to its DG, each SMO estimates the faults affecting their respective DG. The fault compensator for that DG uses the estimated fault to reject faults affecting that DG alone. By rejecting the influence of faults in each DG, the effects of faults on the microgrid are negated.
The paper is organised as follows: Section 2 first introduces the background theory, and formulates the problem. Section 3 then details the central SMO-based fault-tolerant secondary control scheme, while Section 4 describes the distributed SMO-based scheme for fault-tolerant secondary control. Section 5 presents a simulated example verifying the efficacy of the scheme, and Section 6 draws some conclusions. The following notation is used: the norm of a vector z ∈ R a is given by z = ∑ a i=1 z 2 i , the spectrum of a matrix Z is denoted as λ (Z) , r (·) is the unit ramp function, and I b denotes a b × b identity matrix.

Preliminaries
Some necessary background for graph theory [28] is first presented. The communication network between the DGs is modelled as a directed graph G = (V, E ), where V = {1, 2, . . . N} is the vertex set and E ⊂ V × V is the edge set. The adjacency matrix of G is defined as A = a ij ∈ R N×N , where a ii = 0, and a ij = 1 ⇔ (i, j) ∈ E (i.e., if there is an edge from DG i to DG j), and a ij = 0 otherwise. The Laplacian matrix of G is defined as L = l ij ∈ R N×N , where l ii = ∑ N j=1,j =i a ij , and l ij = −a ij if i = j.
The hierarchical control structure of microgrids consists of three levels of control: primary, secondary, and tertiary control [2]. In the primary control level, the droop method is used to adjust the frequency and amplitude of the voltage reference provided to the inner control loops in the DG [11]. The droop method (applied onto DG i) is described by the following voltage and frequency droop characteristics: where v d i and v q i are the voltage amplitudes along the direct axis and quadrature axis in the frame of the primary control of DG i respectively, P i and Q i are the active and reactive powers measured from the terminal of DG i respectively, v n,i and w n,i are the references for the primary control of the voltage and frequency of DG i respectively, and n Q,i and m P,i are the voltage-reactive power and frequency-active power droop coefficients of DG i respectively.
The secondary control loop is then applied to compensate for deviations in the voltage amplitude and frequency [13]. The consensus protocol structure for secondary control is derived according to the method outlined in [14] as follows. Differentiating (1) and (3) yieldṡ Definev n,i − n Q,iQi andẇ n,i − m P,iṖi as the consensus protocol structure, and then the secondary control for the microgrid can be designed for DG i = 1, 2, . . . N asv d i = u v,i ,ẇ i = u w,i , and the references are given byv d r = u v,r ,ẇ r = u w,r . The control laws are set to satisfy that is, the reference voltage v n,i and frequency w n,i are the secondary control parameters to ensure the DG voltage and frequencies track the given reference values. Next, consider a microgrid consisting of N DGs and one reference, where the consensus protocol in [14] is used to regulate the dynamics of each DG (and therefore, the microgrid). The nominal dynamics of the i-th DG in the microgrid is then given as follows: where i = 1, 2, . . . N, and a ij and b i are connection weights which are defined as follows: a ij = 1 if DG i is connected to and sends information to DG j, and a ij = 0 otherwise (note that a ii = 0); likewise, b i = 1 if DG i is connected to the reference, and b i = 0 otherwise. The consensus protocol resulting in the dynamics in (6) however does not consider faults that may occur in each DG, which could cause inaccurate readings to be transmitted to other DGs and result in faulty behaviour of the microgrid.
To account for faulty behaviour in the microgrid, suppose that the voltage and frequency of the i-th DG is affected by the fault f v,i and f w,i , respectively. We then define the compensation u cv,i and u cw,i to reject the effects of faults on the voltage and frequency of the i-th DG, respectively. The dynamics in (6) becomes where m v,i and m w,i are fault distribution weights defined as follows: if u v,i (u w,i ) is faulty (i.e., Assumption 1. The magnitude of the faults affecting the microgrid are bounded, i.e., where θ f ∈ R + is known.
Remark 1. Assumption 1 is a general assumption; microgrids generally operate within certain bounds, and the faults affecting them in practical situations would also be bounded [7,20].
We propose two schemes for SMO-based fault-tolerant secondary control in microgrids. The first scheme is the centralised scheme, where a central SMO is designed to estimate all faults affecting the microgrid based on the outputs from the microgrid (which are a subset of its states). The estimated faults are used by the fault compensator (FC) to reject the influence of all faults on the microgrid. The second scheme is the decentralised scheme, where each DG has its own SMO-based fault-tolerant controller. Each DG only supplies its states to its SMO (as well as other connected DGs), which will estimate faults affecting only that DG. The estimate is then used by the FC to negate the effect of faults on that DG, which by extension, would negate the effects of faults on the entire microgrid. Figure 1 illustrates the structure of the two proposed schemes.   We will first detail the design of the centralised scheme in Section 3, and then present the design for the decentralised scheme in Section 4 afterwards.

The Centralised Fault-Tolerant Control Scheme
We first define the following for brevity of notation: Define rank M v = g and rank M w = h. This implies that there are N − g and N − h zero columns withinM v andM w , respectively. Hence define M v ∈ R n×g and M w ∈ R n×h as matrices containing the g and h non-zero columns ofM v andM w , respectively. Next, define f v ∈ R g and f w ∈ R h to be vectors containing the elements off v andf w corresponding to the non-zero columns of M v andM w , respectively. Then recall the definitions of m v,i and m w,i after (7) Then suppose that only a subset of x s (given by y c = C s x s , where y c ∈ R p ) is transmitted back to the central control centre. Using (9), the dynamics of the microgrid in (7) becomeṡ where L is the Laplacian matrix associated with the graph describing the structure of the microgrid, and f c ∈ R g+h . We then make the following assumptions on system (10) to facilitate further re-expression.
Remark 2. Assumptions 2 and 3 are standard and were assumed in various observer-related works [22,29,30]. Assumption 2 is the matching condition, which merely implies that faults only affect states that are measurable outputs, while Assumption 3 is required for the stability of the SMO, which will be designed in the next subsection.
Define a matrix N C ∈ R (2N−p)×2N satisfying C s N C = 0. Hence there exists a non-singular matrix Apply the transformation x s → T a x s = x a , and re-express (10) as We now introduce the following proposition to further re-express system (11) for later analysis.

Proposition 1.
Suppose that Assumption 2 is satisfied. Then there exists a set of transformations such that system (11) can be re-expressed as: where , and x c2 are defined in the proof. Suppose that Assumption 3 is also satisfied; then L 0 can be chosen such that A c1 + LA c3 has stable eigenvalues, i.e., λ (A c1 + LA c3 ) < 0.
Proof. Assumption 2 implies rank (M a2 ) = g + h, and therefore there exist a matrix T b1 ∈ R (2N−p)×p and a non- where . Then define a non-singular matrix , where x c2 ∈ R p to obtain the system in the coordinates of (12)- (14). Next, since T L T b T a and C c2 are non-singular, it can be seen from the structures in (12)-(16) that Assumption 3 then implies rank (R(s)) = 2N − p ∀ s ∈ C + . This in turn implies from the Popov-Hautus-Rosenbrock (PHR) rank test [31] that the unobservable modes of (A c1 , A c32 ) (i.e., the values of s that make R(s) lose rank) are stable, i.e., (A c1 , A c32 ) is detectable. Thus, L 0 can always be chosen such that The dynamics in (7) are re-expressed as the state-space system (12)-(14), which is compatible with the Edwards-Spurgeon SMO [22].

The Observer for Fault Estimation
The Edwards-Spurgeon SMO [22] for system (12)- (14) has the structure:x where A c0 ∈ R p×p and ρ c ∈ R are designed in the succeeding analysis.

Remark 3.
The purpose ofx c2 is not to estimate x c2 (which can already be calculated from (14)). Rather,x c2 is used together with (19)- (20) to compute ν c , which will later be used to estimate f c .
Define the errors e c1 =x c1 − x c1 and e cy =ŷ c − y c . Then from (12)- (14) and (18)-(20), the following error system (which characterises the performance of the SMO) is obtained: The following proposition is then used to show how sliding motion is achieved in SMO (18)-(20).

Proposition 2.
Suppose that for a given positive scalar η c , there exist a symmetric positive definite matrix P c ∈ R (2N−p)×(2N−p) and any matrix Q c ∈ R (2N−p)×(p−g−h) satisfying the following linear matrix inequality(LMI): Suppose also that SMO (18)- (20) is designed using L 0 = P −1 c Q c , and where ζ c ≥ e c1 (0) λ min (P c ) and θ c > f c max . Then an ideal sliding motion for error system (21)-(22) takes place on surface S c = {e c1 , e cy : e cy = 0} in finite time.
Proof. There are two parts to the proof: the first portion would show how e c1 is bounded by ζ c . Define a Lyapunov candidate function V c1 = e T c1 P c e c1 , and differentiating it with respect to time yieldṡ Substituting for P c and Q c into LMI (23) gives Hence satisfying LMI (23) [32]. Thus, the first part of the proof is complete. In the next and final part of the proof, it will be shown that setting A c0 and ρ c to satisfy (24), (25) will result in sliding motion on S c taking place in finite time. Define another Lyapunov candidate function V cy = e T cy e cy , and differentiating it with respect to time results iṅ Recall e c1 ≤ ζ c and f c max < θ c . Hence, substituting for ν c from (20) into (28) and setting A c0 < 0 (satisfying Equation (24)) yieldṡ It can therefore be seen that setting ρ c to satisfy (25) results inV cy < −2δ c e cy < −2δ c V cy (where δ c is an arbitrary positive constant). This is the reachability condition [33], which results in e cy = 0 in finite time. Thus, a sliding motion on S c is induced in finite time, completing the proof. . After sliding motion occurs,ν c rapidly switches between +1 and −1 to maintain the sliding motion on S c , which could result in chattering [34]. To alleviate the chattering, ρ c should be set to be as small as possible while still satisfying (25). An additional measure is to implement a modified switching termν c = −ρ c C −1 c2ŷ c −y c ŷ c −y c +κ c , where κ c is a small positive constant. The use ofν c would however result in ideal sliding motion on S c no longer taking place -instead, e cy would be constrained within a small boundary region around zero, and the size of the boundary region is proportional to κ c [34].
The following theorem then shows how x c1 (and therefore x s ) and f c are estimated using the system structure in (12) where ν c,eq is the equivalent output error injection required to maintain an ideal sliding motion on surface S c . Pre-multiply (31) with C −1 c2 , substitute for A c3 and M c2 from (16), and rearrange to obtain Then define the estimated faultf c and fault estimation error e c f aŝ respectively. Substituting for e c f into (32) yields Next, recall from Proposition 2 that as t → ∞, e c1 → 0; this implies that the observer estimates x c1 asymptotically. Additionally, from (34), as t → ∞, e c f → 0. Hence the observer can simultaneously estimate x c1 as well as f c , i.e., as t → ∞,x c1 → x c1 andf c → f c , thus completing the proof.
Thus, the analysis of the SMO to estimate the states and faults in system (12)-(14) (and therefore, (10)) was completed.

Design of the Compensation
In this subsection, the estimated faultf c will be used to design the compensation u cc to reject the influence of f c on system (10). Partition the matrices M v and M w from (10) as The compensation for the i-th DG, u c,i , is given by Then by using (9)- (10) and (36), it can be seen that K s u cc = −M sfc . Therefore, substituting for u cc from (36), and the definition of e c f from (33) into (10) yieldṡ Recall from Theorem 1 that as t → ∞, e c f → 0. Hence the effects of f c on the dynamics of the microgrid in (10) are rejected by u cc . Thus, the design of the centralised fault-tolerant scheme is complete.

Design Procedure
A summarised design procedure for the centralised fault-tolerant scheme is given as follows: 1. Formulate the system in the form of (10) using (7)-(9). 2. Check that Assumptions 1-3 hold. If not, do not continue as the scheme is not applicable. 3. Calculate T a from before (11) and T b from Proposition 1. Apply the transformation x s → T b T a x s to obtain the structures in (15)-(16). 4. Pick a value for LMI parameter η c , and use a LMI solver to determine P c and Q c from LMI (23).

The Decentralised Fault-Tolerant Control Scheme
In this next section, we denote the collective i-th DG-observer-FC structure as module i (in accordance with Figure 1b). In this scheme, a SMO is used to estimate f i for each module. Then the compensation u d,i is designed based on the estimated fault affecting each module to compensate for the effects of f i on the module itself. Since each module estimates and compensates for faults affecting themselves, the effects of faulty behaviour on the entire microgrid are negated. The consensus protocol would then work as intended (i.e., without the effects of faulty behaviour), and drive the dynamics of the microgrid towards its intended trajectory. The following are defined for convenience: where i = 1, 2, . . . N. We now make the following assumption to ease analysis.

Assumption 4.
Measurements of x d,i are assumed to be available to the SMO of the i-th module.
Remark 5. Assumption 4 implies that the sensor readings for the i-th DG, and the reference voltage and frequencies are known by the SMO for the same module, which is a reasonable assumption.
Without loss of generality, it is assumed that m v,i = m w,i = 1 ∀ i = 1, 2, . . . N (i.e., u v,i and u w,i are faulty for all modules). Then from (38) and Assumption 4, the dynamics of each module in (7) can be re-expressed asẋ System (39) has fully measurable states (similar to the system in ( [35], Section 3.2)), known inputs x n,i and u d,i , and the unknown input f i . Hence the observer used to estimate f i is a specific case of the Edwards-Spurgeon SMO with the same number of states and outputs [22].

The Distributed Observer for Estimating f i
The observer for system (39) has the structure [22] where A d0,i ∈ R 2×2 and ρ d,i ∈ R are designed in the succeeding analysis.

Remark 6.
Please note that the purpose ofx d,i is not to estimate x d,i (which can already be obtained from sensor measurements). Instead,x d,i is used to compute ν d,i in (41), which will later be used to estimate f d,i .
Define the error e d,i =x d,i − x d,i . Then from (39)-(40), the following error system (which characterises the performance of the SMO) is obtained: The following theorem is used to design SMO (40)-(41) to estimate f d,i .

Theorem 2. Suppose that SMO (40)-(41) is designed using
where θ d,i > f d,i max . Then f d,i can be estimated by SMO (40)-(41) in finite time.
Proof. There are two parts to the proof: the first portion will show how sliding motion on surface S d,i = {e d,i : e d,i = 0} is achieved. Define a Lyapunov candidate function V d,i = e T d,i e d,i , and differentiating it with respect to time results iṅ Substituting for ν d,i from (41) into (45) and satisfying (43) yieldṡ It can therefore be seen that setting ρ d,i to satisfy (44) results inV d,i < −2δ d,i e d,i < −2δ d,i V d,i (where δ d,i is an arbitrary positive constant). This is the reachability condition [33], which results in e d,i = 0 in finite time. Thus, a sliding motion on S d,i is induced in finite time, completing the first part of the proof.
The next and final part of the proof will show how f d,i is estimated. After sliding motion occurs, e d,i ,ė d,i = 0, and error system (42) becomes where ν dq,i is the equivalent output error injection required to maintain an ideal sliding motion on surface S d,i . Define the fault estimationf d,i and fault estimation error e d f ,i aŝ respectively. Substituting for e d f ,i into (47) yields e d f ,i = 0. Since sliding motion (and therefore (47)) is obtained in finite time, then e d f ,i = 0 (and hencef d,i = f d,i ) is achieved in finite time as well. Hence the observer estimates f d,i in finite time, thus completing the proof.
. After sliding motion occurs,ν d,i switches rapidly between +1 and −1 to maintain the sliding motion on S d,i , giving rise to chattering. Similar to Remark 4, measures to reduce the effects of chattering include setting ρ d,i to be as small as possible while still satisfying (44), and using a modified The SMO for module i was designed. Thus, by designing SMOs for each module, the faults affecting each module, and by extension the microgrid, can be estimated.

Design of the Compensation u d,i
In this subsection, the estimated faultf d,i will be used to design u d,i to reject the influence of f d,i on system (39). Partitionf d,i as follows:f wheref v,i ∈ R 1 andf w,i ∈ R 1 are estimations of the faults f d,i and f w,i , respectively. Then let the compensation for the i-th module, u d,i , be given by From (38) and (48), it can be seen that u d,i = −f d,i . Therefore, substituting for f d,i and u d,i from (38) and (50), and using the definition of e d f ,i from (48) on (38) yieldṡ Recall from Theorem 2 that e d f ,i = 0 after sliding motion is achieved. Hence the effects of f d,i on (39) (i.e., module i) are rejected by u d,i . Then by designing the compensation (50) for each module, the effects of faults on the microgrid can also be negated. Thus, the design of the decentralised fault-tolerant protocol is complete.

Design Procedure
A summarised design procedure for the presented scheme is given as follows. For each DG i, 1. Formulate the system in the form of (39) using (7)

Remark 8.
Two observer-based FTC schemes are presented: a centralised one in Section 3, and a decentralised one in Section 4. The centralised scheme can only estimate (and therefore, reject the influence of) faults affecting states that are measured by the central SMO. The decentralised scheme can however estimate (and therefore, negate the effects of) faults entering any state in the microgrid since each SMO has access to both states in its module. On the other hand, the centralised scheme is less computationally intensive, since only a single SMO is required for the entire microgrid. In the decentralised scheme however, each module has its own SMO, which can translate to greater hardware and implementation costs. Designers should thus consider this cost-reliability trade-off when deciding on which scheme to use for their system.

Simulation Example
To demonstrate the effectiveness of our proposed scheme, consider a modified version of the 3-DG microgrid in [14], which is illustrated in Figure 2. To showcase the performance of the scheme, suppose that the voltage of the third DG, and the frequencies of the first and third DG is affected by the faults f v,3 , f w,1 , and f w,3 , respectively. While both states of each DGs can be locally measured by the DG itself, only the voltages and frequencies of the first and third DGs can be reliably broadcast back to the control centre. Control inputs can however be fed into all DGs. The consensus protocol between each DG in (7) is therefore given by The centralised fault-tolerant scheme in Section 3 will first be designed according to the steps in Section 3.3. Next, the decentralised fault-tolerant scheme in Section 4 will be designed using the procedure in Section 4.3.

Design of the Centralised Scheme
Step 1. The microgrid in (52) can be rewritten in the form of (10) as Step 2. The following is obtained from (53): It can be verified that Assumptions 2 and 3 are satisfied.
Step 3. The non-singular matrices T a and T b are calculated to be The structures in (15)- (16) are then found to be C c2 = 0 1 I 3 0 and Step 4. The SeDuMi solver for YALMIP in MATLAB is used on LMI (23) The design of the centralised fault-tolerant scheme is complete. We now proceed to the design of the decentralised fault-tolerant scheme.

Design of the Decentralised Scheme
Steps 1 and 2. The dynamics of each DG in (52) can be rewritten in the form of (39) using (7) and (38) as Since each DG can locally measure both of its own states, Assumption 4 is satisfied.
Steps 3-6. The parameters for each SMO are chosen as follows: The faults affecting each module are then estimated from 3 , respectively. It can then be seen that f dv,3 ,f dw,1 , andf dw,3 are the estimations for f v,3 , f w,1 , and f w,3 , respectively. The compensation for each module are then designed using (50) and (61) as u cv,1 u cw,1

Performance of the Schemes
The design of both fault-tolerant schemes is complete. To demonstrate the effectiveness of the observers at estimating the fault, we first simulate a case where the compensation for both schemes are set to be zero, i.e., u cc , u d,i = 0, for i = 1, 2, 3. Then to show the efficacy of the fault compensation, we simulate a second case where the compensation for the centralised scheme is set to be as designed in (58), and the compensation for the decentralised scheme is set to be as designed in (62). In both cases, the initial condition of the microgrid is set = 300 310 290 324 319 304 , while the observer is set to have zero initial conditions. The reference inputs are set to be The fault signals are then set as For ease of notation, define the state and fault estimation errors respectively as

The Centralised Scheme
Figures 3-6 show the performance of the centralised scheme for the case where the compensation is set to be zero (i.e., u cc = 0). Figure 3 shows the states of system (53), their estimates, and the reference, while Figure 4 shows the state estimation errors. It can be seen that the states are severely affected by the faults, and track the references very poorly. The observer is however able to estimate the states despite the presence of the fault, and after about t = 4 s, the state estimation errors converge to zero. Figure 5 then shows the faults affecting system (53) and their estimates, while Figure 6 shows the fault estimation errors. The observer is able to estimate the fault faithfully after about t = 4 s, thus proving the effectiveness of the proposed centralised scheme at state and fault estimation.  Figure 7 shows the states of system (53), their estimates, and the reference, while Figure 8 shows the compensation into each state. It can now be seen that the states now track the references (after an initial transient period due to the differences in initial conditions of the system and the observer). Thus, the effectiveness of the proposed centralised scheme was demonstrated.    Scheme   Figures 9-12 show the performance of the decentralised scheme for the case where the compensation is set to be zero (i.e., u d,i = 0 for i = 1, 2, 3). Figure 9 shows the states of system (53), their estimates, and the reference, while Figure 10 shows the state estimation errors. As was with the centralised case, the system states are severely affected by the faults, and poorly track the references. The observers are still however able to estimate the states even in the presence of faults, and after about t = 0.3 s, the state estimation errors converge to zero. Figure 11 then shows the faults affecting system (53) and their estimates, while Figure 12 shows the fault estimation errors. The observers are able to faithfully estimate the fault after about t = 0.5 s, thus proving the effectiveness of the proposed decentralised scheme at state estimation and fault estimation.    Figure 13. The states of system (53) (solid), their estimates from the distributed SMOs (dashed), and the reference value (dash-dotted) for the case where u d,i for i = 1, 2, 3 is implemented as designed in (62). Figures 13 and 14 on the other hand show the performance of the decentralised scheme when the compensation is set as it was designed in (62). Figure 13 shows the states of system (53), their estimates, and the reference, while Figure 14 shows the compensation into each state. The states track the references (after an initial transient period due to the differences in the initial conditions of the system and the observer). Thus, the efficacy of the proposed decentralised scheme has also been shown.

Conclusions
Two schemes for fault-tolerant secondary control in microgrids were presented. The dynamics of the microgrid considered in the paper includes faults in the secondary control, as well as compensation to negate the effects of these faults. The first scheme consists of a centralised SMO-based fault-tolerant controller. The system is first re-expressed using transformations to ease analysis and design of the fault-tolerant scheme. Outputs from the microgrid (which are a subset of its states) are measured by the central SMO to estimate the faults affecting the microgrid. The estimated faults are used to negate the effects of the faults on the microgrid. The second scheme uses a SMO-based fault-tolerant controller for each DG, which would estimate faults affecting only that DG, and compensate for only those faults. Simulations were carried out, and the results demonstrate the effectiveness of both presented schemes. The presented work however has only considered the secondary control of the microgrid. Hierarchical control consists of two more controls: primary and tertiary. Furthermore, the sensitivity of the microgrid performance with respect to parameter variation and measurement noise are important considerations. We thus aim to take these into account in our future investigations.