## 2 System Description and Equations of Motion
### Equations of Motion  
Consider a flexible bar of mass \(M\) and length \(B\) consisting of \(n\) cylindrical rods with masses \(m_{i}=m=M/n\) and lengths \(b_{i}=b=B/n\), \(i=1,...,n\), in a gravitational field and assume that the system is constrained to move only in the two-dimensional plane. Figure 3 shows the geometric representation of this model.  
Figure 1: SMA-actuated flexible bar system.  
Figure 2: Free body diagram of the flexible bar: (**a**) initial (straight) state; (**b**) after deflection.  
In order to introduce the equations of motion, the generalized coordinates must be specified; the coordinates must uniquely determine the state of the system. In this model, angular coordinates \(\alpha_{i}\) which indicates the inclination of the consecutive segments toward the y-axis are chosen as generalized coordinates. The position of the \(i\)-th segment center of mass (\(x_{i},y_{i}\)) can be represented as:  
\[\begin{array}{c}x_{i}=\sum_{j=1}^{i-1}b\sin(\alpha_{j})+\frac{1}{2}b\sin \left(\alpha_{i}\right)\\ \\ y_{i}=-\sum_{j=1}^{i-1}b\cos(\alpha_{j})-\frac{1}{2}b\cos\left(\alpha_{i} \right)\end{array} \tag{1}\]  
where \(\alpha_{i}\) indicates the angle between the \(i\)th rod and the vertical axis \(y\), \(b\) is the length and \(m\) represents the mass of each rod.  
To obtain the mathematical model of the system the Lagrangian function and [PERSON]'s equation can be used. The Lagrangian function is defined by  
\[L=T-U, \tag{2}\]  
where \(T\) is the kinetic energy and \(U\) is the potential energy of the system. The Lagrange's equation is described as follows  
\[\frac{d}{dt}\frac{\partial}{\partial q_{j}}L-\frac{\partial}{\partial q_{j}}L =Q_{no-pot} \tag{3}\]  
where \(q_{j}\) and \(Q_{no-pot}\) represent the \(j\)-th generalized coordinate and non-potential force respectively. In our case  
\[q_{1}=\alpha_{1}\;,q_{2}=\alpha_{2}\;,...,\;q_{n}=\alpha_{n}\;.\]  
The kinetic energy of the model is the sum of kinetic energy of each rod and is given by  
\[\begin{array}{c}T=\frac{1}{2}\sum_{i=1}^{n}\left[m\left(\dot{x}_{i}^{2}+\dot {y}_{i}^{2}\right)+I_{i}\dot{\alpha}_{i}^{2}\right]=mb^{2}\sum_{i=1}^{n}\left[ \frac{3(n-i)+1}{6}\right]\dot{\alpha}_{i}^{2}+\\ \\ mb^{2}\sum_{i=1}^{n}\sum_{j=i+1}^{n}\left[\frac{2(n-i)+1}{2}\right]\dot{\alpha }_{i}\dot{\alpha}_{j}\cos\left(\alpha_{i}-\alpha_{j}\right)\;,\end{array} \tag{4}\]  
where \(I_{i}=(1/12)mb^{2}\) is the moment of inertia of each segment about its mass center. In the same way, the potential energy of the system depends on the gravitational energy of each segment and is expressed as follows  
\[U=\sum_{i=1}^{n}mgy_{i}=-\sum_{i=1}^{n}\frac{2\left(n-i\right)+1}{2}mgb\cos( \alpha_{i}), \tag{5}\]  
Figure 3: The discrete model of \(n\)-rod.  
where \(g\) indicates the gravitational acceleration.  
Introduce the vector \(\alpha=[\alpha_{1},...,\alpha_{n}]^{\top}\) for the considered system. After applying the Lagrange equation, the general form of the equation of the motion of the system can be expressed as:  
\[A(\alpha)\ddot{\alpha}+B(\alpha,\dot{\alpha})\dot{\alpha}+C(\alpha)=Q_{no-pot} \tag{6}\]  
where:  
\[A(\alpha)=\left[\begin{array}{cccc}A_{11}&A_{12}&\cdots&A_{1n}\\ A_{12}&A_{22}&\cdots&A_{2n}\\ \vdots&\vdots&\ddots&\vdots\\ A_{1n}&A_{2n}&\ldots&A_{nn}\end{array}\right]\]  
and  
\[A_{ij}=\frac{3(n-j)+1}{3}mb^{2}\ \ \ \mbox{when}\ \ i=j\]  
\[A_{ij}=\frac{2(n-j+1)-1}{2}mb^{2}\cos(\alpha_{i}-\alpha_{j})\ \ \ \mbox{when}\ \ i\
eq j.\]  
The matrix \(B\) is skew-symmetric and is expressed by  
\[B(\alpha,\dot{\alpha})=\left[\begin{array}{cccc}0&B_{12}&\cdots&B_{1n}\\ -B_{12}&0&\cdots&B_{2n}\\ \vdots&\vdots&\ddots&\vdots\\ -B_{1n}&-B_{2n}&\ldots&0\end{array}\right]\]  
with  
\[B_{ij}=\frac{2(n-j+1)-1}{2}mb^{2}\dot{q}_{j}\sin(\alpha_{i}-\alpha_{j})\]  
and the vector C is described as  
\[C(\alpha)=\left[\begin{array}{c}C_{1}\\ C_{2}\\ \vdots\\ C_{n}\end{array}\right]\]  
where  
\[C_{i}=\left((n-i)+\frac{1}{2}\right)mgb\sin\alpha_{i}.\]