## 3 Design of an Observer for Detecting Tie-Line Power Considering Uncertainties  
In this section, an observer is designed to detect tie-line power based on accessible known-secured variables. Since system frequency is a global variable, the frequency of each position in the area is the same. When the attackers compromise the frequency measurement device in one place, the defender can cross verify the frequency measurement value in other places. Therefore, we utilize the system frequency as a known-secured variable and establish the following observer:  
\[ \begin{cases}\hat{z}_{i}=W_{i}z_{i}+T_{i}B_{i}u_{i}+T_{i}E_{ij}\Delta f_{j}+Y_ {i}y_{i}\\ \hat{x}_{i}=z_{i}+N_{i}y_{i}\end{cases}  \tag{10}\]  
where \(z\) represents the state vector of the dynamic system (10); \(\hat{x}_{i}\) represents the observation of \(x_{i}\); and \(W_{i}\), \(T_{i}\), \(Y_{i}\) and \(N_{i}\) are the gain matrices with appropriate dimensions. Let \(e=x_{i}-\hat{x}_{i}\), and using the output equation in (10), we have  
\[ \begin{split} e&=x_{i}-\hat{x}_{i}\\ &=x_{i}-z_{i}-N_{i}C_{i}x_{i}-N_{i}G_{i}\omega_{i}\\ &=(I_{n}-N_{i}C_{i})x_{i}-z_{i}-N_{i}G_{i}\omega_{i}\end{split}  \tag{11}\]Using (1), (10), and (11), we can derive  
\[ \begin{split}\dot{e}=&(I_{n}-N_{i}C_{i})\dot{x}_{i}- \dot{z}_{i}-N_{i}G_{i}\dot{\omega}_{i}\\ =&(I_{n}-N_{i}C_{i})(A_{i}x_{i}+B_{i}u_{i}+E_{ij} \Delta f_{j}+F_{i}\Delta P_{i}^{d})+(I_{n}-N_{i}C_{i})(\Delta A_{i}x_{i}+ \Delta B_{i}u_{i})\\ &-\big{(}W_{i}z_{i}+T_{i}B_{i}u_{i}+T_{i}E_{ij}\Delta f_{j}+(Y_{i 1}+Y_{i2})y_{i}\big{)}-N_{i}G_{i}\dot{\omega}_{i}\\ =&(A_{i}-N_{i}C_{i}A_{i})x_{i}-Y_{i1}C_{i}x_{i}-W_{i }z_{i}-Y_{i2}y_{i}+[(I_{n}-N_{i}C_{i})B_{i}-T_{i}B_{i}]u_{i}\\ &+\big{[}(I_{n}-N_{i}C_{i})E_{ij}-T_{i}E_{ij}\big{]}\Delta f_{j}+ (I_{n}-N_{i}C_{i})F_{i}\Delta P_{i}^{d}\\ &-Y_{i1}G_{i}\omega_{i}-N_{i}G_{i}\dot{\omega}_{i}+(I_{n}-N_{i}C _{i})(\Delta A_{i}x_{i}+\Delta B_{i}u_{i})\end{split}  \tag{12}\]  
where \(Y_{i}=Y_{i1}+Y_{i2}\); \(I_{n}\) is an \(n\)-dimensional identity matrix. Considering that \(x_{i}=e+\dot{x}_{i}=e+z_{i}+N_{i}y_{i}\), (12) can be expressed as  
\[ \begin{split}\dot{e}=&(A_{i}-N_{i}C_{i}A_{i}-Y_{i 1}C_{i})e+(A_{i}-N_{i}C_{i}A_{i}-Y_{i1}C_{i}-W_{i})z_{i}\\ &+[(A_{i}-N_{i}C_{i}A_{i}-Y_{i1}C_{i})N_{i}-Y_{i2}]y_{i}+[(I_{n} -N_{i}C_{i})B_{i}-T_{i}B_{i}]u_{i}\\ &+[(I_{n}-N_{i}C_{i})E_{ij}-T_{i}E_{ij}]\Delta f_{j}+(I_{n}-N_{i }C_{i})F_{i}\Delta P_{i}^{d}\\ &-Y_{i1}G_{i}\omega_{i}-N_{i}G_{i}\dot{\omega}_{i}+(I_{n}-N_{i}C _{i})(\Delta A_{i}x_{i}+\Delta B_{i}u_{i})\end{split}  \tag{13}\]  
If the following relationships can be held:  
\[\Xi_{i}=(I_{n}-N_{i}C_{i}) \tag{14}\]  
\[W_{i}=(I_{n}-N_{i}C_{i})A_{i}-Y_{i1}C_{i} \tag{15}\]  
\[(I_{n}-N_{i}C_{i})F_{i}=0 \tag{16}\]  
\[(I_{n}-N_{i}C_{i})=T_{i} \tag{17}\]  
\[Y_{i2}=((I_{n}-N_{i}C_{i})A_{i}-Y_{i1}C_{i})N_{i} \tag{18}\]  
we can derive the following observation error:  
\[ \begin{split}\dot{e}=&((I_{n}-N_{i}C_{i})A_{i}-Y_{i 1}C_{i})e+0\cdot z_{i}+0\cdot y_{i}+0\cdot B_{i}u_{i}+0\cdot E_{ij}\Delta f_{j }\\ &+0\cdot\Delta P_{i}^{d}-Y_{i1}G_{i}\omega_{i}-N_{i}G_{i}\dot{ \omega}_{i}+(I_{n}-N_{i}C_{i})(\Delta A_{i}x_{i}+\Delta B_{i}u_{i})\\ =&(\Xi_{i}A_{i}-Y_{i1}C_{i})e-Y_{i1}G_{i}\omega_{i}- NG_{i}\dot{\omega}_{i}+\Xi_{i}\Delta A_{i}x+\Xi_{i}\Delta B_{i}u_{i}\end{split}  \tag{19}\]  
Based on the theory proposed in [26], the necessary and sufficient conditions for the existence of the observer are as follows: (1) rank \((C_{i}F_{i})=\text{rank}(F_{i})\). The special solution is \(N_{i}^{s}=F_{i}[(C_{i}F_{i})^{T}(C_{i}F_{i})]^{-1}(C_{i}F_{i})^{T}\). (2) \((C_{i},\Xi_{i}A_{i})\) is a detectable pair. Theorem 1: _There exists a sub-optimal robust observer for the LFC system discussed in this paper when the following two conditions are satisfied:_  
_(1) There exists \(\gamma>0\) such that_  
\[\sup_{\alpha\
eq 0}\frac{\|e\|}{\|\alpha\|}<\gamma \tag{20}\]  
_where \(\alpha=[u_{i}^{T}\ \ \omega_{i}^{T}\ \ \dot{\omega}_{i}^{T}\ \ \Delta f_{j}\ \ \Delta P_{i}^{d}]^{T}\).__(2) There exists a positive definite matrix P and Q, such that_  
\[