# WAMS-Based Online Disturbance Estimation in Interconnected Power Systems Using Disturbance Observer
## 3 Proposed Disturbance Observer-Based Disturbance Estimation
### State Observer Design  
In order to design the disturbance observer we first need to design the state observer to estimate the unknown system states. In real systems, some states might not be directly accessible, hence the need to design a state observer. In control and design, any virtual system driven by the inputs and outputs of the actual system can act as an observer. If we consider a linear time invariant (LTI) system given as  
\[\begin{cases}\dot{x}=Ax+Bu+F_{d}d_{lx}\\ y=Cx+D_{u}u+D_{d}d_{y}\end{cases} \tag{17}\]  
In a more compact term by taking into account the time varying parameters, the system can be represented as  
\[\begin{cases}\dot{x}(t)=Ax(t)+Bu(t)+F_{d}d_{lx}\\ y(t)=Cx(t)\end{cases} \tag{18}\]  
where \(D_{u}=D_{d}=0\), \(C\) is the output matrix.  
In state observer design \(x(t_{0})=x_{0}\) is unknown, however, the output variables \(y(t)\) of the original systems are present at any time. This output information is necessary to design a virtual system of the same order, which replicates the dynamics of the original system. From design and experiments, the matrices \(A\), \(B\), \(F_{d}\) and \(C\) are known, therefore, the observer can have the following structure  
\[\begin{cases}\dot{\hat{x}}(t)=A\widehat{x}(t)+Bu(t)+F_{d}\widehat{d_{lx}}\\ \widehat{y}(t)=C\widehat{x}(t)\end{cases} \tag{19}\]  
Since \(x(t_{0})=x_{0}\) for the system is unknown and \(\hat{x}(t_{0})=\hat{x}_{0}\) for the observer is chosen randomly, the difference between \(y(t)\) and \(\hat{y}(t)\) will generally give an error that can be calculated as  
\[y(t)-\hat{y}(t)=Cx(t)-C\hat{x}(t)=Ce(t) \tag{20}\]  
Figure 2: Set up for disturbance estimation.  
Since our aim is to estimate the states, the output error can then be used as a feedback to minimize the state errors given by  
\[e(t)=x(t)-\hat{x}(t) \tag{21}\]  
By considering the feedback, the state observer becomes  
\[\hat{x}(t)=A\hat{x}(t)+Bu(t)+F_{d}\hat{d}_{lx}+K\left(y(t)-\hat{y}(t)\right) \tag{22}\]  
Or simply  
\[\hat{x}(t)=A\hat{x}(t)+Bu(t)+F_{d}\hat{d}_{lx}+KCe(t) \tag{23}\]  
K is the state observer gain to be chosen such that \(\underset{t\rightarrow\infty}{K}=0\).  
Using Equations (18) and (23), the error dynamics are given as  
\[\begin{cases}\dot{e}(t)=\left(A-KC\right)e(t)\\ e(t_{0})=unknown\end{cases} \tag{24}\]  
The requirement for the observer design is that \(K\) needs to be chosen such that \(\left(A-KC\right)\) is asymptotically stable. This assures that for any randomly chosen initial value, the estimation error will in time eventually be zero. The pair \(\left(A,C\right)\) must be observable or detectable. Ideally, the observer dynamics must be faster as compared to the system dynamics. As an example, the observer can be chosen to be five times faster. Mathematically this is done by assuring that the smallest real eigenvalue of the observer is five times that of the original system thus  
\[\left|\text{Re}\left\{\lambda_{\text{min}}\left(A-KC\right)\right\}\right|_{ observer}>5|\text{Re}\left\{\lambda_{\text{max}}\left(A-BF\right)\right\}|_{system} \tag{25}\]  
The observer eigenvalues \(\lambda_{i}\left(A-KC\right)\) can be obtained from a pole placement method.