## 3 Sliding Mode Control of the Flexible Bar Using Penalization Method
### Sliding Mode Controller Design and Lyapunov-Like Stability Analysis
For \(k_{0}=f^{+}+\frac{1}{2}\rho\) and \(\rho<0\)  
\[\dot{V}=2S^{\intercal}(f+\tau d)+\mu g^{\intercal}(x)\frac{d}{dx}g(x)\dot{x} \leq 2\left\|S\right\|\left\|f\right\|+2\tau S^{\intercal}d+\mu g^{\intercal}(x) \frac{d}{dx}g(x)\dot{x} \tag{14}\]0  
since  
\[\dot{V}=2S^{\intercal}(f+\tau d)+\mu g^{\intercal}(x)\frac{d}{dx}g(x)\dot{x} \leq 2\left\|S\right\|\left\|f\right\|+2\tau S^{\intercal}d+\mu g^{\intercal}(x) \frac{d}{dx}g(x)\dot{x} \tag{14}\]1  
it follows  
\[\dot{V}=2S^{\intercal}(f+\tau d)+\mu g^{\intercal}(x)\frac{d}{dx}g(x)\dot{x} \leq 2\left\|S\right\|\left\|f\right\|+2\tau S^{\intercal}d+\mu g^{\intercal}(x) \frac{d}{dx}g(x)\dot{x} \tag{14}\]2  
which implies  
\[\dot{V}=2S^{\intercal}(f+\tau d)+\mu g^{\intercal}(x)\frac{d}{dx}g(x)\dot{x} \leq 2\left\|S\right\|\left\|f\right\|+2\tau S^{\intercal}d+\mu g^{\intercal}(x) \frac{d}{dx}g(x)\dot{x} \tag{14}\]3  
therefore, \(V(t)=0\) for all \(t\geq t_{r}\) with  
\[\dot{V}=2S^{\intercal}(f+\tau d)+\mu g^{\intercal}(x)\frac{d}{dx}g(x)\dot{x} \leq 2\left\|S\right\|\left\|f\right\|+2\tau S^{\intercal}d+\mu g^{\intercal}(x) \frac{d}{dx}g(x)\dot{x} \tag{14}\]4  
As was mentioned before, the external torque \(\tau\) is produced by the SMA actuator and the control input of the actuator is the electrical current \(i\). In order to obtain the input current, the relation between the produced torque \(\tau\) and the electrical current input \(i\) in the SMA actuator is used [23]:  
\[\dot{V}=2S^{\intercal}(f+\tau d)+\mu g^{\intercal}(x)\frac{d}{dx}g(x)\dot{x} \leq 2\left\|S\right\|\left\|f\right\|+2\tau S^{\intercal}d+\mu g^{\intercal}(x) \frac{d}{dx}g(x)\dot{x} \tag{14}\]5  
where \(\phi\) is the time constant of the actuator, \(i(t)\) is the current input and \(a\) is SMA tendon offset from the neutral axis of the bar. The Equation (25) is a low pass filter, thus  
\[\dot{V}=2S^{\intercal}(f+\tau d)+\mu g^{\intercal}(x)\frac{d}{dx}g(x)\dot{x} \leq 2\left\|S\right\|\left\|f\right\|+2\tau S^{\intercal}d+\mu g^{\intercal}(x) \frac{d}{dx}g(x)\dot{x} \tag{14}\]6where  
\[ \begin{array}{|c|}\hline i_{0}(t)=\frac{\tau_{0}}{a}\\ \\ i_{comp}(t)=\frac{\tau_{comp}}{a}\\ \hline\end{array}  \tag{27}\]  
Consequently, it can be demonstrated that the external torque \(\tau\) will track the current input \(i\) in a finite time. The dynamic equation of SMA can be written as  
\[\dot{\tau}=-\frac{1}{\phi}(\tau-a\;i(t)). \tag{28}\]  
Let us define  
\[S_{A}=\tau-ai \tag{29}\]  
and introduce the following Lyapunov function:  
\[V_{A}=\frac{1}{2}S_{A}^{\intercal}S_{A}\]  
then by taking derivative of \(V_{A}\) the following relation holds  
\[\dot{V}_{A}=S_{A}(\dot{\tau}-a\frac{d}{dt}i)=S_{A}(-\frac{1}{\phi}(\tau-ai(t))- a\frac{d}{dt}i)=\]  
\[S_{A}(-\frac{1}{\phi}S_{A}-a\frac{d}{dt}i)\leq-\frac{1}{\phi}\left\|S_{A} \right\|^{2}+a\left\|S_{A}\right\|\left\|\frac{d}{dt}i\right\|\]  
if  
\[\frac{d}{dt}i\leq h^{+}\]  
then  
\[\dot{V}_{A}\leq-\frac{1}{\phi}\left\|S_{A}\right\|^{2}+a\left\|S_{A}\right\|h ^{+}=-\frac{1}{\phi}\left\|S_{A}\right\|\left(\left\|S_{A}\right\|-ah^{+}\right)\]  
for \(\left\|S_{A}\right\|\geq ah^{+}\) we have \(\dot{V}_{A}<0\) implying  
\[\left\|S_{A}\right\|\rightarrow\left\{S_{A}:\left\|S_{A}\right\|\leq ah^{+}\right\}\]  
which demonstrates that the torque will track the current input.