## 3 The Data-Driven Adaptive Control Strategy
### Adaptive Controller Design
The reference model \(T_{d}\left(z^{-1}\right)\) in Figure 4 is the z-domain transfer function that is computed by transforming \(T_{d}(s)\) into the discrete-time domain using the bilinear method [21]. The objective of the VRFT function in the autotuning unit is to optimize the controller so that the resulting closed-loop transfer function is identical to the reference model \(T_{d}\left(z^{-1}\right)\). Only the I/O data collected during the experiment are used directly in the VRFT function. The plant model \(G\left(z^{-1}\right)\) can remain unknown since it is not required in the VRFT function, and hence the system identification can be eliminated from the controller tuning process. More details of the fundamental VRFT theories can be found in [16; 22]. The reference model \(T_{d}\left(z^{-1}\right)\) generates the desired system output \(y_{d}\left(z^{-1}\right)\), which is expressed as  
\[y_{d}\left(z^{-1}\right)=T_{d}\left(z^{-1}\right)r\left(z^{-1}\right) \tag{7}\]  
where \(r\left(z^{-1}\right)\) is the reference signal (i.e., the setpoint). During the laser-based DED process, the laser voltage signal and MPW data collected during the time interval \(\Delta t\) are denoted by  
\[D=\ \left\{\left(u_{k},\ y_{k}\right),\ k=1,2\ldots N\right\} \tag{8}\]  
where \(u_{k}\) and \(y_{k}\) are the \(k\)th instance of the laser voltage and MPW data, respectively. Given the reference model \(T_{d}\left(z^{-1}\right)\) and system output \(y\left(z^{-1}\right)\), the virtual reference signal can be computed as  
\[\overline{r}\left(z^{-1}\right)=T_{d}^{-1}\left(z^{-1}\right)y\left(z^{-1}\right) \tag{9}\]  
where \(y\left(z^{-1}\right)\) is the discrete-time transform of the measured MPW dataset \(\left\{y_{1},\ y_{2},\ y_{3},\ldots y_{N}\right\}\). The virtual reference signal \(\overline{r}\left(z^{-1}\right)\) is not the actual input signal used to generate the resulting MPW \(y\left(z^{-1}\right)\). Instead,  
Figure 4: Block diagram of the adaptive controller with an autotuning unit. it is the desired reference signal fed into the reference model \(T_{d}\big{(}z^{-1}\big{)}\) if we consider the measured output \(y\big{(}z^{-1}\big{)}\) as the desired system output \(y_{d}\big{(}z^{-1}\big{)}\). Based on the computed virtual reference signal \(\overline{r}\big{(}z^{-1}\big{)}\), the virtual error signal \(\overline{e}\big{(}z^{-1}\big{)}\) is defined as the difference between the virtual reference signal and the measured system output, i.e.,  
\[\overline{e}\big{(}z^{-1}\big{)}=\overline{r}\big{(}z^{-1}\big{)}-y\big{(}z^{ -1}\big{)}=\big{(}T_{d}{}^{-1}\big{(}z^{-1}\big{)}-1\big{)}y\big{(}z^{-1}\big{)} \tag{10}\]  
The unknown plant model \(G\big{(}z^{-1}\big{)}\) can produce the MPW \(y\big{(}z^{-1}\big{)}\) when it is fed with the measured laser voltage \(u\big{(}z^{-1}\big{)}\). Therefore, we can define an \"ideal controller\" \(C\big{(}z^{-1},\theta\big{)}\) that should generate the measured laser voltage \(u\big{(}z^{-1}\big{)}\) when it is fed with the virtual error signal \(\overline{e}\big{(}z^{-1}\big{)}\). The above control action can be written as  
\[u\big{(}z^{-1}\big{)}=C\big{(}z^{-1},\ \theta\big{)}\overline{e}\big{(}z^{-1} \big{)} \tag{11}\]  
The controller \(C\big{(}z^{-1},\theta\big{)}\) can be represented in the general format of:  
Figure 2:0  
where \(\theta\) is the variable controller parameter and \(\rho^{T}\big{(}z^{-1}\big{)}\) is a vector of transfer functions. For a discrete PID controller \(C_{pilot}\big{(}z^{-1},\theta\big{)}\), the following expression can be obtained by applying the bilinear transform to Equation (2), and the \(\theta\) and \(\rho\big{(}z^{-1}\big{)}\) terms in Equation (12) are now \(\Big{[} \begin{array}{cc}K_{p}&K_{i}&K_{d}\end{array} \Big{]}\) and \(\Big{[} \begin{array}{cc}1&\frac{T_{s}}{2}\frac{1+z^{-1}}{1-z^{-1}}&\frac{ 2}{T_{s}}\frac{1-z^{-1}}{3-z^{-1}}\end{array} \Big{]}^{T}\), respectively. \[C_{pilot}\big{(}z^{-1},\theta\big{)}=\Big{[} \begin{array}{cc}K_{p}&K_{i}&K_{ d}\end{array}