# Load Frequency Optimal Active Disturbance Rejection Control of Hybrid Power System
## 3 The Proposed Control Strategy
### Linear Quadratic Regulator  
An LQR controller provides the optimal feedback control law for closed-loop systems in the presence of various uncertain factors, ensuring the high-performance design of the system [29]. Consider a state-space representation of the plant provided.  
\[\left\{\begin{array}{l}\dot{x}(t)=Ax(t)+Bu(t)\\ y(t)=Cx(t)\\ u(t)=-K_{opt}x(t)\end{array}\right. \tag{17}\]  
where \(x(t)\) is the system state vector.  
The objective of an LQR controller is to compute an optimal control law vector, denoted as \(K_{opt}\), which efficiently drives the system state from its current state to the desired state while minimizing energy consumption. The quadratic cost function is commonly represented in the following manner [30].  
\[J(u)=\int_{0}^{t}\left(y^{T}Qy+u^{T}Ru+2y^{T}Nu\right)dt \tag{18}\]  
The weights on the output values \(y(t)\) and control input \(u(t)\) are defined by \(Q\) and \(R\), respectively. Both \(Q\) and \(R\) are positive semi-definite matrices. \(N\) is the weighting value of \(y(t)\) and \(u(t)\). The singular positive solution \(P\) can be derived through the resolution of the Riccati equation.  
\[PA+A^{T}P-PBR^{-1}B^{T}P+Q=0 \tag{19}\]  
The determination of the state feedback gain is achieved through the utilization of the following equation.  
\[K_{opt}=R^{-1}B^{T}P \tag{20}\]  
The ESO incorporates exogenous disturbances, non-modeled dynamics, and parameter uncertainties as part of its estimation process. It utilizes observation errors to extract disturbance information and estimate these extended states [30].  
Suppose a disturbance is present at the input of the plant. The state-space representation of the plant can be described as follows:  
\[\left\{\begin{array}{l}\dot{x}(t)=Ax(t)+B(u(t)+w(t))\\ y(t)=Cx(t)\end{array}\right. \tag{21}\]The state-space representation of the internal model can be formulated as follows:  
\[\left\{\begin{array}{l}\dot{x}_{w}=A_{w}x_{w}+B_{w}w^{k-1}\\ w=C_{w}x_{w}\end{array}\right. \tag{22}\]  
\[(A_{w})_{3\times 3}=\begin{bmatrix}0&1&0\\ 0&0&1\\ 0&0&0\end{bmatrix}\]  
\[(B_{w})_{3\times 1}=\begin{bmatrix}0\\ 0\\ 1\end{bmatrix}\]  
\[(C_{w})_{1\times 3}=\begin{bmatrix}1&0&0\end{bmatrix} \tag{23}\]  
The value of \(k\) is determined to be set as 3 based on experience. The matrices \(A_{w}\), \(B_{w}\), and \(C_{w}\) are denoted as Equation (23). Substituting Equation (22) into Equation (21), the dynamics of the plant can be derived as Equation (24).  
\[\left\{\begin{array}{l}\dot{x}(t)=Ax(t)+B(u(t)+Cx_{w})\\ y(t)=Cx(t)\end{array}\right. \tag{24}\]  
Therefore, the dynamics of the extended system can be represented as Equation (25).  
\[\left\{\begin{array}{l}\dot{\overline{x}}(t)=\overline{A}\overline{x}(t)+ \overline{B}u(t)+\overline{E}w^{k-1}(t)\\ y(t)=\overline{Cx}(t)\end{array}\right. \tag{25}\]  
By solving the previous equations, an estimation of the extended system state can be obtained.  
The control strategy proposed in this work cancels the equivalent disturbance of the plant by utilizing the estimate provided by an ADRC system, which is shown in Equation (26).  
\[\Delta P_{c,i}=u_{1}-K_{opt(i)}\hat{x}_{i} \tag{26}\]  
where \(u_{1}\) is the control value from the ADRC controller.