# An Advanced Physiological Control Algorithm for Left Ventricular Assist Devices
## 2 Materials and Methods
### Control Design
#### 2.4.2 Control Algorithm  
To implement the control algorithm, we propose to use the pole placement SMC (PP-SMC) approach. In this particular design, the control system matrix is represented by (\(A-BK\)). The gain matrix (\(K\)) is derived by assigning n-desired eigenvalues in the pole placement, where (\(K\in R^{n}\)). By choosing the suitable \(K\) for state feedback, it is possible to  
Figure 2: Phase shift for \(Q_{r}\) in comparison with \(E_{t}\). force the system to have closed-loop poles in the right location where the original system is completely controllable. Therefore, to determine \(K\), we use [PERSON]'s formula [34]. Accordingly, the dynamic model in (4) can be written as  
\[ \begin{array}{l}\chi(n+1)=(A-BK)\chi(n)+\delta A\chi(n)+Bu(n)+\xi(n)\\ Q_{p}(n)=C\chi(n)\end{array}  \tag{6}\]  
In this method, we propose using the following sliding surface:  
\[\sigma(n)=\gamma e(n)=\gamma(\chi_{d}(n)-\chi(n)) \tag{7}\]  
where \(\gamma\) is the constant vector and formulated to guarantee that the system is asymptotically stable for \(\sigma(n)=0\). From (7), we can write  
\[\sigma(n+1)=\gamma e(n+1)=\gamma(\chi_{d}(n+1)-\chi(n+1)) \tag{8}\]  
In order to achieve the requirements of stability and strong reachability, we propose using the Gao formula [35]:  
\[\sigma(n+1)=(1-\Delta T)\sigma(n)-\tau\mathit{Tsign}(\sigma(n)) \tag{9}\]  
where \(T\) is the sampling period and \(\Delta\geq 0\), \(\tau>0\) satisfies that \(0<(1-\Delta T)<1\). Equivalating (6), (8), and (9) gives  
\[ \begin{array}{l}\sigma(n+1)=\gamma(\chi_{d}(n+1)-((A-BK)\chi(n)+\delta A \chi(n)+Bu(n)+\xi(n)))\\ =(1-\Delta T)\sigma(n)-\tau\mathit{Tsign}(\sigma(n))\end{array}  \tag{10}\]  
Upon solving (10), the control command signal (\(u(n)\)) is obtained as  
\[u(n)=-(\gamma B)^{-1}\bigg{(} \begin{array}{l}\gamma(A-BK)\chi(n)+\gamma \delta A\chi(n)+\gamma\xi(n)-\gamma\chi_{d}(n+1)\\ +(\Delta T-1)\gamma\sigma(n)+\tau\mathit{Tsign}(\sigma(n))\end{array} \bigg{)} \tag{11}\]  
In this design, Neuro-sliding mode control was employed to eliminate uncertainties and unknown external disturbances. Based on (11), the control command signal (\(u(n)\)) can be constructed as equivalent neural network (\(u_{e}(n)\)) and corrective neural network (\(u_{c}(n)\)). Here, \(u_{e}(n)\) is designed to keep the system states on the \(\sigma(n)=0\), while \(u_{c}(n)\) is trained to force the system states back to \(\sigma(n)\). Therefore, from (11), we can write  
\[u(  
To maintain the system states on the proposed sliding surface \((\sigma(n)=0)\), we need to estimate the equivalent control law as  
\[\widehat{u}_{e}(n)=\omega.sign(\sigma(n))\left(\sum_{i=1}^{m}G_{i}.sign(\sigma(n ))\left(\sum_{j=1}^{n}\overline{G}_{j,i}.F_{i}\right)\right) \tag{15}\]  
In order to restore the plants' state to the sliding surface, we need to train the estimated corrective control law as  
\[\widehat{u}_{c}(n)=\omega_{c}.sign(\sigma(n))\left(\sum_{j=1}^{n}\gamma_{j}e_{ j}(n)\right) \tag{16}\]  
To achieve a robust estimation for \(\widehat{u}_{e}(n)\) and \(\widehat{u}_{c}(n)\), the training methods employ the following cost functions based on iterative steepest descent algorithm to reduce the mean square errors between the desired and actual values as  
\[\text{E}=\frac{\left(u_{e}(n)-\widehat{u}_{e}(n)\right)^{2}}{2} \tag{17}\]  
\[\text{T}=\frac{(\sigma(n))^{2}}{2} \tag{18}\]  
Based on (17), the weight updating law to reduce (E) can be written as  
\[ \begin{array}{c}\delta G_{i}=-\beta\partial E/\partial G_{i}\\ =\frac{\left(\beta\sigma(n).\omega.Q_{p}-\beta\sigma(n).\omega.sign(\sigma(n ))u^{2}netQ_{p}\right)}{2}\end{array}  \tag{19}\]  
\[ \begin{array}{c}\delta\widehat{G}_{j,i}=\frac{-\beta\partial E}{\partial G_ {j,i}}\\ =\frac{\left(\beta\sigma(n).\omega.G_{i}-\beta\sigma(n).\omega.sign(\sigma(n ))u^{2}netQ_{i}\right)\left(1-sign(\sigma(n))Q^{2}_{p}\right)F_{i}}{4}\end{array}  \tag{20}\]  
where \(\beta>0\).