## 2 Model Free Algorithms
### Model Free Adaptive Control (MFAC)
#### 2.1.2 Partial Form Dynamic Linearization (PFDL)
\(\phi_{1,n}=new\_\phi_{1,n}\), \(aEs\_v_{k,n}=new\_\phi_{1,n}\), \(aEs\_v_{k,n}=Es_{n}\), \(last\_aEs_{k,n}=\min(aEs\_v_{n})\). \(maEs\_v_{n}=\min(aEs\_v_{n})\). if\(i>3\) and \((aEs\_v_{k,n}>0\) and \(aEs\_v_{k-1,n}>0\) and \(aEs\_v_{k-2,n}>0)\) or \((aEs\_v_{k,n}==maEs\_v_{n}\) and \(aEs\_v_{k-1,n}==maEs\_v_{n}\) and \(mEs\_v_{k-2,n}==maEs\_v_{n})\)then
7. **end if**
8. **end if**
9. **else** 1. flag = 0, 2. **brake. **
10. **end if**
11. **end if**
12. **end for** \(\Phi_{L1}^{*}=\Phi_{n,H-1}\) endfor
```  
**Algorithm 3** The MFAC PFDL law for the control system  
The following pseudocode describes the algorithms:  
From the point of view of complexity, Algorithm 2 is also efficient. It requires a complexity \(O(i+j+\ldots+l)\) from the point of view of time and space, depending on the number of iterations \(i,j,\ldots,l\) of the algorithm, given by the dimension of \(L\). This calculation is valid in the context of a constant duration of the simulation, both in terms of time and space required to store the values acquired from the control system. The following pseudocode describes the algorithms:  
From the point of view of complexity, Algorithm 2 is also efficient. It requires a complexity \(O(i+j+\ldots+l)\) from the point of view of time and space, depending on the number of iterations \(i,j,\ldots,l\) of the algorithm, given by the dimension of \(L\). This calculation is valid in the context of a constant duration of the simulation, both in terms of time and space required to store the values acquired from the control system. ```
1. Finds a set of parameters of the MFAC PFDL law for which the system is stable Initialize flag = 1, \(i\) = 1, \(\Phi_{1}\_v=0\), \(Es\_v=0\), last_aEs = 99999 for each \(n\in[1,L]\) do
2. **while** (flag == 1) 1. run the experiment and acquire \(e_{k}\) and \(\hat{\phi}_{n,k}\) values 2. increment \(i\) 3. calculate \(aEs_{k,n}\)\(aEs_{k,n}\), \(al\phi_{n,k}\) 4. calculate \(new\_\

### Model Free Control (MFC)

The MFC method was introduced by [8] and presents intelligent PID controllers (iPID) as an alternative to the classic version. This intelligent variant has as a differentiating factor the fact that it is not designed based on a model of the system, but only uses the data that can be purchased from the control system to obtain an ultralocal model. As the authors show in [8], this new type of PID controller ensures steady state error for constant references in any configuration thanks to an embedded integrator. In order to obtain the discrete-time form of the iPID controller, the Laplace transform was applied to the continuous-time models of the ultralocal model and the iPID controller, respectively, from [8]. Thus, the ultralocal model becomes:

\[s^{v}Y(s)=F(s)+\alpha U(s), \tag{16}\]

where \(\alpha\) is a parameter chosen by practitioner, \(F(s)\) is a function which contains all of the unmodelled components of the ultralocal model, while \(v\) is the derivative order of output signal, which may be chosen as 1 or 2, depending on controller type [8]. Similarly, the iPID controller is described by:

\[U(s)=\frac{1}{\alpha}\bigg{(}s^{v}\widetilde{Y}(s)-F(s)+\bigg{(}K_{p}+\frac{K _{i}}{s}+K_{d}s\bigg{)}E(s)\bigg{)}, \tag{17}\]

where \(\widetilde{Y}\) is the reference signal, \(E=\widetilde{Y}-Y\) is the control error, and \(K_{p}\), \(K_{i}\), and \(K_{d}\) are the tuning gains of a classical PID controller. The discretization of the ultralocal model from Equation (16) and iPID control law from Equation (17) is completed using the Euler approximation method. Since the \(Z\) transform of \(s\) is \((z-1)/T_{s}\) for forward Euler approximation and \(\big{(}1-z^{-1}\big{)}/T_{s}\) for backward approximation [38], the discrete form is easily obtained by replacing \(s\) with \(\Delta_{E}\) in Equation(16) and Equation (17), where the notation has been used:

\[\Delta_{E}=\left\{ \begin{array}{l}\frac{(z-1)}{T_{s}},\text{for forward approximation}\\ \frac{\big{(}1-z^{-1}\big{)}}{T_{s}},\text{for backward approximation}\end{array} \right.