## 3 Controller Design Based on Legendre Polynomial FAT
### Uncertainty Factors Function Approximation Based on the Legendre Polynomial
#### 3.1.1 Legendre Polynomial Function Approximation  
Suppose that \(V\) is the space of all real-valued continuous-time functions. According to the [17,20,24], a nonlinear function \(h(x)\), which defined on the interval \([x_{1}\,x_{2}]\) in \(V\), can be represented as the function approximation of Equation (6a).  
\[h(x)=\sum_{i=0}^{m}\alpha_{i}\varphi_{i}(x)+\varepsilon_{m}(x)\] (6a) where, \[\varphi_{0}(x)\], \[\varphi_{1}(x)\ldots\], \[\varphi_{m}(x)\] is a \[m\] -th Legendre polynomial, and satisfies the orthogonal basis. \[\varepsilon_{\text{m}}(x)\] is the approximation error, and bounded [20]. \[\alpha_{i}\] is approximation coefficient, as follows. \[\alpha_{i}=\frac{1}{A_{i}}\int_{x_{1}}^{x_{2}}h(x)\varphi_{i}(x)dx\,i=0,1, \ldots\ldots m \tag{6b}\] \[\int_{x_{1}}^{x_{2}}\varphi_{i}(x)\varphi_{j}(x)dx\,=\,\left\{\begin{array}{ l}0\,i\
eq j\\ A_{i}\,i=j\end{array}\right. \tag{6c}\]  
he Legendre polynomial requires that the nonlinear \(h(x)\) must be defined on the interval \([-11]\) (i.e., \([x_{1}\)\(x_{2}]\) is \([-11]\)). Therefore, \(\varphi_{i}(x)\) in Equation (6) can be defined by Equation (7).  
\[\begin{array}{l}\varphi_{0}(x)=1,\,\,\varphi_{1}(x)=x\\ (i+1)\varphi_{i+1}(x)=(2i+1)x\varphi_{i}(x)-iq_{i-1}(x)\end{array} \tag{7}\]  
Thus, the \(h(x)\) defined on the \([-11]\) can be approximated by Legendre polynomial in the form of (6), which the coefficients \(\alpha_{i}\) (\(i\) = 0, 1,..., \(m\)) are calculated by Equations (3) and (4), and the \(\varphi_{i}(x)\) (\(i\) = 0, 1,..., \(m\)) are given by Equation (7). Finally, the transformation of the matrix expression of the Equation (6) can be obtained by the Equations (8) and (9).  
\[h(x)_{LP}=P^{\text{T}}\varphi(x)+\varepsilon_{m}(x) \tag{8}\]  
\[P=[\alpha_{0}\,\alpha_{1}\,\ldots\ldots\ldots\ldots\alpha_{m}]^{\text{T}} \tag{9a}\] \[\varphi(x)=[\varphi_{0}(x)\,\varphi_{1}(x)\,\ldots\ldots\ldots\,\varphi_{m}(x )]^{\text{T}} \tag{9b}\]  
where, \(h(x)_{LP}\) is the approximation function after transformed; \(\alpha_{i}\) is vectorized to obtain the approximation coefficient \(P\).  
Note 1. In Equation (9), \(P\) cannot be calculated by the Equations (3) and (4), since \(h(x)_{LP}\) is unknown. For the controller of this paper, this parameter is adjusted online by the adaptive control law.  
Note 2. In [20], another important issue about function approximation may be the fact that the \(\varphi_{i}(x)\) are mutually orthogonal just on the interval \([-11]\). Out of this interval, the functions \(\varphi_{i}(x)\) maynot be mutually orthogonal. However, for the \(H(\eta,\,t)\), which is a nonlinear function based on the motion state and time, it is impossible to be limited to \([-1,1]\). For this problem, the author makes \(x=\sin(\omega t)\) in the Equation (7), \(\omega\) is a predefined constant.  
Then, combining the Equations (7) and (9b), the \(\varphi(x)\) can be expressed as:  
\[\varphi(x)=\left[1,\,x,\,\frac{1}{2}(3x^{2}-1),\,\frac{1}{2}(5x^{3}-3x),\, \frac{1}{8}(35x^{4}-30x^{2}+3),\ldots\ldots\right] \tag{10}\]  
where \(x=\sin(\omega t)\in[-1,1]\) satisfies the interval requirement.