# Design of Wing Root Rotation Mechanism for Dragonfly-Inspired Micro Air Vehicle
## 4 Design of Flapping Mechanism
### Define Link Length of Flapping Mechanism  
We defined the link length of the flapping mechanism so that the stroke amplitude is within a given range, and \(\theta_{2,z}\), \(\theta_{2,x}\) are within the angle limits of the spherical joint. The mechanism was determined to have a stroke amplitude of \(-40^{\circ}\) to \(40^{\circ}\), an angle of the \(x\)-axis of the spherical joint within 60-120\({}^{\circ}\), and an angle of the \(z\)-axis of the spherical joint within 60-90\({}^{\circ}\). In the processing, the limit of the \(z\)-axis angle of the spherical joint was set as \(90^{\circ}\) rather than \(120^{\circ}\) to avoid physical collision at \(90^{\circ}\). The link length was defined in three steps: (1) the determination of \(l_{2,p}\) with respect to the \(x\)-axis limit of the spherical joint; (2) the calculation of \(l_{3}\), \(l_{4,z}\) with respect to the stroke amplitude; and (3) the determination of \(l_{4,x}\) with respect to the \(z\)-axis limit of the spherical joint.  
To determine the link length with respect to the \(\theta_{2,x}\) range, \(l_{2,p}\), which is projected on the \(y\)-\(z\) plane of \(l_{2}\), as shown in Figure 10a, is defined as (11).  
\[l_{2,p}=\frac{l_{1}}{\cos\left(\theta_{2,x}\right)} \tag{11}\]  
The maximum and minimum values of \(\theta_{2}\) for calculating \(l_{2,p}\) are the same because the central axis of the crank link and flapping link are located on the same plane, as shown in Figure 10b. This means that if the link value is determined for one of the maximum and minimum values, then the other value is also defined. Therefore, \(l_{2,p}\) was obtained by applying \(\theta_{2,min}\) to (11), after \(\theta_{2,min}\) was defined as \(77^{\circ}\)  
Figure 10: (**a**) Projected on the \(y\)-\(z\) plane; (**b**) projected on the \(x\)-\(z\) plane of flapping mechanism.  
Figure 9: Schematic kinematics of spatial four-bar link-based flapping mechanism.  
Second, in order to calculate \(l_{3}\) and \(l_{4,z}\), and having the stroke amplitude defined in Table 1, the relation between \(l_{3}\) and \(l_{4,z}\) is expressed as (12) and (13) when \(\theta_{3}\) is the maximum and minimum, respectively.  
\[l_{3,\max}=\frac{\left(l_{2,p}+l_{1}-l_{4,z}\right)}{\sin\left(\theta_{3,\max} \right)} \tag{12}\]  
\[l_{3,\min}=\frac{\left(l_{2,p}-l_{1}-l_{4,z}\right)}{\sin\left(\theta_{3,\min }\right)} \tag{13}\]  
In addition, to determine \(l_{3}\) and \(l_{4,z}\) for the desired stroke amplitude, the object function was defined as (14), which is the absolute value of the difference between (12) and (13).  
\[O_{\left(l_{3},l_{4}\right)}=\left|l_{3,\max}-l_{3,\min}\right| \tag{14}\]  
Afterwards, \(l_{3}\) and \(l_{4,z}\) were determined by the defined object function and line search method. \(l_{2,p}\) is different from the previously defined value, but the defined \(l_{2,p}\) was used because the difference in values is within the tolerance range. Finally, we defined the link length for the angle limit of \(\theta_{2,z}\), as shown in Figure 10b; \(\theta_{2,z}\) has the maximum value when \(\theta_{3}\) is the maximum. The maximum value of \(\theta_{2,z}\) was defined as \(80^{\circ}\), and \(l_{4,x}\) was obtained by applying the variables to (15).  
\[l_{4,x}=l_{3}\cos\left(\theta_{3}\right)-\frac{l_{2,p}}{\tan\left(\theta_{2,z,\max}\right)} \tag{15}\]  
The values of \(\theta_{3}\), \(\theta_{2,x}\), \(\theta_{2,z}\), and the link lengths obtained from the kinematic equations are summarized in Table 3. Figure 11 shows each angular value according to the crank angle change. In the graph, we confirmed that \(\theta_{2,x}\) and \(\theta_{2,z}\) are within the angle limit of the spherical joint, and \(\theta_{3}\) is within the desired stroke amplitude.