# Algorithms for Fractional Dynamical Behaviors Modelling Using Non-Singular Rational Kernels
## 3 Algorithms to Model More General Fractional Behaviors
### A Least Squares Method to Obtain the Kernel Samples \(\eta(kT_{e})\)
It reveals a very accurate estimation of \(\eta(t)\), with a quadratic error over \(N_{s}=5000\) data samples  
\[\varepsilon_{q}=\frac{1}{N_{s}}{\sum_{k=1}^{N_{s}}}\left({\eta_{f}(kT_{e})- \eta(kT_{e})}\right)^{2}=7.426\times 10^{-5}\cdot T_{e}=0.1s \tag{33}\]  
Algorithm for \(\eta(kT_{e})\) Sample Fitting with a Non-Singular Rational Kernel and a Given Absolute Error Bound  
The interlaced poles and zeros concept in a non-singular rational function proved its efficiency in Section 2 to fit a pure power law behavior (a fractional behavior). The concept is used again here to develop an algorithm for fitting more general fractional behaviors from their impulse response \(\eta(t)\) (that can be computed as detailed in Section 3.1) with a given absolute error bound \(\delta\). This algorithm is given below. Figure 5: Pseudo random binary sequence used as the input of the transfer function \(H(s)\). It must be noted that with Algorithm 2, the time domain on which the poles are located is defined in step 1. At this step, it is supposed that the function to fit, \(\eta(t)\), is known on the interval \(t\in\left[t_{0},t_{f}\right]\) with \(0<t_{0}<t_{f}\). This is on this interval that the poles and the zeros are placed by the algorithm. There is thus no risk for instability and ill-conditioning with relation (4). ```
1:Compute \(\eta(t)\) on \(t\in\left[t_{0},t_{f}\right]\); select \(\delta\); initialise \(slope=0\); initialise \(\eta_{a}(t)=\eta(t_{0})\);
2:Compute the bound \((\log(\eta(t))+\delta)\) and \((\log(\eta(t))-\delta)\) on \(t\in\left[t_{0},t_{f}\right]\);
3:Compute \(t_{l}=\min\limits_{t}(\log(\eta(t))-\delta=\eta(t_{0}))\) and \(t_{u}=\min\limits_{t}(\log(\eta(t))+\delta=\eta(t_{0}))\);
4:if \(t_{l}=\{\varnothing\}\), \(t_{l}=t_{f}\);
5:if \(t_{u}=\{\varnothing\}\), \(t_{u}=t_{f}\);
6:if \(t_{l}<t_{u}\), \(slope=slope+1\); \(t_{m}=t_{l}\); \(\eta(t)=\eta(t)\left(\frac{t}{t_{m}}+1\right)\); \(c=\log\ \eta(t_{m})-\delta-slope*\log(t_{m})\);
7:if \(t_{u}<t_{l}\), \(slope=slope-1\); \(t_{m}=t_{u}\); \(\eta(t)=\frac{\eta(t)}{\left(\frac{t}{t_{u}}+1\right)}\); \(c=\log\ \eta(t_{m})+\delta-slope*\log(t_{m})\);
8:Compute \(t_{l}=\min\limits_{t}(log(\eta(t))-\delta)=slope*Log(t)+c\) and

\(t_{u}=\min\limits_{t}(\log(\eta(t))+\delta=slope*\log(t)+c)\) on \(t\in\left[t_{m},t_{f}\right]\); if \(t_{l}=\{\varnothing\}\), \(t_{l}=t_{f}\); if

\(t_{u}=\{\varnothing\}\), \(t_{u}=t_{f}\);

9:If \(t_{l}\
eq t_{f}\) or \(t_{u}\
eq t_{f}\) go to to step 6;

10:end. ```  
**Algorithm 2** Fitting of a general fractional behaviour with a Non-Singular Rational Kernel and a Given Absolute Error Bound  
Algorithm 2 is now applied to another fractional behavior: the impulse response of a fractional model defined by the transfer function  
\[H(s)=K\frac{\left(\frac{s^{\
u}}{\omega_{x1}^{\
u}}+1\right)}{\left(\frac{s^{ \
u}}{\omega_{p1}^{\
u}}+1\right)\left(\frac{s^{\
u}}{\omega_{p2}^{\
u}}+1 \right)\left(\frac{s^{\
u}}{\omega_{p3}^{\
u}}+1\right)} \tag{34}\]  
with \(\
u=0.5\), \(K=5\), \(\omega_{z1}=0.4\) rd/s, \(\omega_{p1}=0.01\) rd/s, \(\omega_{p2}=2\) rd/s, \(\omega_{p3}=100\) rd/s. Figure 6: Comparison of \(\eta(t)\) and \(\eta_{f}(t)\). After partial fraction decomposition, the impulse response of the transfer function \(H(s)\) is defined analytically by:  
\[\eta_{f}(t)=A_{1}t^{v-1}E_{v,v}\big{(}-\omega_{p1}t^{v}\big{)}+A_{2}t^{v-1}E_{v,v }\big{(}-\omega_{p2}t^{v}\big{)}+A_{3}t^{v-1}E_{v,v}\big{(}-\omega_{p3}t^{v} \big{)} \tag{35}\]  
with \(A_{1}=4.899\times 10^{-2}\), \(A_{2}=2.051\times 10^{-1}\) and \(A_{3}=-2.541\times 10^{-1}\). The results produced by Algorithm 2 for three values of \(\delta\), \(\delta=0.6\), \(\delta=0.4\) and \(\delta=0.2\) are shown in \[\eta_{f}(t)=K+\frac{A_{1}}{\sqrt{\pi t}}+A_{2}t^{\
u-1}E_{\
u,\
u}\big{(}{-\omega _{p2}t^{\
u}}\big{)}+A_{3}t^{\
u-1}E_{\
u,\
u}\big{(}{-\omega_{p1}t^{\
u}}\big{)} \tag{29}\]0 This figure shows the function \(\log(\eta(t))\) and the two bounds \(\log(\eta(t))-\delta\) and \(\log(\eta(t))+\delta\).