## 3 Simultaneous Estimation Scheme for Parameter and State
### Observer Structure Based on Optimization Theory  
The design of observer implies the fulfilment of the observability condition that the unmeasured states can be inferred(or estimated) based on the available measured outputs. In this paper, it is assumed that the system (1) is observable with their normal working excitation \(u(t)\) and the system parameters are slow time variable.  
In order to esimate the states and unknown parameters, a way to solve state and parameter estimation is to consider the parameters as the extended state variables with zero dynamic [3] in a time window T, that is,  
\[\hat{x}(t)=\left[\begin{array}{c}x\\ \theta\end{array}\right],\dot{\theta}=0, \tag{4}\]  
Thus the representation (1) is rewritten as:  
\[\dot{x}(t) =g(\hat{x}(t),u(t))\] \[\dot{g}(t) =C\hat{x}(t), \tag{5}\]  
where:  
\[g=\left[\begin{array}{c}f\\ 0\end{array}\right] \tag{6}\]  
The estimated state \(\hat{x}(t)\) of observer (5) is given by the following integral with initial state \(x(0)\).  
\[\hat{x}(t) =\int_{0}^{T}g(\hat{x}(t),u(t))dt\] \[\hat{y}(t) =C\hat{x}(t). \tag{7}\]If \(x(0)\) is determined in a unique continuous system, then \(x(t)\) can be calculated immediately according to (7). As a result, the estimating of the initial values of state allows us to estimate the current values of the unobtained state variables. However, in practical engineering applications, the integral of \(g(\hat{x}(t),u(t))\) is difficult to be solved accurately. Therefore, the optimization method is considered to be used to obtain the approximate solution of multi-dimensional state estimation. Before we construct the optimization objective function, the generalized vector deviation is defined as follows  
**Definition 3**.: _Generalized Vector Deviation Let \(\mathcal{V}\) be a non-empty vector set, for any elements \(X,Y\in\mathcal{V}\), if the real value of \(d(X,Y)\) satisfies:_  
_(i)_ \(d(X,Y)=0\)_, iff_ \(X=Y\)_;_ _(ii)_ \(|d(X,Y)|=|d(Y,X)|\)_; then_ \(d(.,.)\) _is a generalized vector deviation on_ \(\mathcal{V}\)_._  
The selection of the formulation of the sample vector generalized vector deviation should have a clear engineering physical meaning, so that the value of the generalized vector deviation should reflect the closeness degree of the vectors in engineering sense, so as to reflect the closeness degree of the pre-estimate initial state \(\tilde{x}_{0}(i,g)\) and the actual initial state \(x_{0}\).  
In order to achieve the optimal state estimation, in this work, the object function \(F(d(\hat{Y},Y))\) describing the closeness of observer output vector \(\hat{Y}\) to the real output vector \(Y\) is designed which satisfies:  
\[F(d(\hat{Y},Y))\geq 0,F(d(\hat{Y},Y))=0\,iff\,d(\hat{Y},Y)=0, \tag{8}\]  
where, \(d(\hat{Y},Y)\) is the generalized vector deviation between the vector \(\hat{Y}\) and the vector \(Y\) which is defined in the definition (3). \(d(\hat{Y},Y)=0\) means \(\hat{Y}=Y\).  
Let vector \(Y=Y(x_{0})\), vector \(\hat{Y}=Y(\hat{x}_{0})\), then the object function is:  
\[f_{ob}(\hat{x}_{0})=F(d(Y(\hat{x}_{0}),Y(x_{0}))). \tag{9}\]  
The constraint condition for this optimization problem(9) is a polyhedron which is constructed by the range of parameters and state.  
Consequently, the following adaptive observer based on constraint Optimization is obtained:  
\[\left\{\begin{array}{l}\hat{x}=g(\hat{x}(t),u(t))\\ \hat{y}=C\hat{x}\\ \hat{x}(t)=\underset{\hat{x}}{arg\,\,min}\left\{f_{ob}\right\},\end{array}\right. \tag{10}\]  
where \(\underset{\hat{x}}{min}\left\{\ast\right\}\) presents the optimization calculation using the optimization algorithm.  
To summarize, the estimation scheme based on adaptive observer using optimization is shown as the Figure 1 below.