## 4 Numerical Simulation
### Complex Dynamic Response  
Because of the nonlinear dynamic characteristic, as well as the existence of the relative sliding between the piston and cylinder, analyzing the complex behavior of the proposed system is needed. First of all, the sliding friction model (\(F_{sf}\)) given by [PERSON] 1991 [34] is presented as the following:  
\[F_{sf}=F_{c}+(F_{s}-F_{c})e^{-(\sigma/v_{s})^{n_{s}}}+\sigma\upsilon \tag{39}\]  
in which \(F_{c}\) is the Coulomb friction force, \(F_{s}\) is the static friction force, vs. is the Stribeck velocity, \(v\) is the relative velocity between two contacting surfaces, \(\sigma\) is the viscous friction coefficient, and \(n_{s}\) is the exponent of the Stribeck curve. In order to identify parameters of the friction model of a cylinder, instead of experimenting, a virtual model of a cylinder shown in Figure 17 is built through AMEsim software. This method ensures the accuracy and reduces the time because the environment of a virtual model is similar to an actual model. For instance, the heat exchange exists between the air in the cylinder and surrounding environment, the dead volume of the cylinder, frictional phenomenon, etc. Herein, the cylinder used for identification has the piston diameter of 80 mm, rod diameter of 32 mm, stroke length of 300 mm, and the dead volume at two ends of 50 cm\({}^{3}\), whilst the parameters for simulation are given in Table 1. During the simulated process, the cylinder is fixed, meanwhile the speed of load attached at the end of the rod is controlled to track the constant value through introducing a PID controller. Simultaneously, its acceleration is measured by an accelerometer. In this identification, the frictional force between the cylinder and piston is not measured directly, and it is calculated as follows:  
\[F_{sf}=\left\{ \begin{array}{l}F_{1}-F_{2}-F_{ef}\text{ for Extending}\\ F_{2}-F_{1}-F_{ef}\text{ for Retracting}\end{array} \right. \tag{40}\]  
Figure 16: The stability of the response curve. In this calculation, due to constant velocity, the inertia force is ignored, \(F_{\mathit{eff}}\) is the external force, \(F_{1}=P_{1}A\) and \(F_{2}=P_{2}(A-a)\) in which \(A\), \(a\) are the areas of the piston and rod, \(P_{1}\) and \(P_{2}\) are the air pressure in chamber as denoted in Figure 17, which are measured by two pressure sensors. Then, genetic algorithms, including three operations--reproduction, crossover, and mutation, as shown in Figure 18, are employed to determine optimal values of the friction model given in Equation (39). This work aims to minimize the cost function expressed by Equation (41). As observed in Figure 19, after 30 iterations, the cost function converges to zero. \[J=\frac{1}{2}\sum\left(F_{\mathit{msf}}^{i}-F_{\mathit{sf}}^{i}\right)^{2} \tag{41}\]  
in which \(F_{\mathit{msf}}\) is the friction force measured at \(i\)th constant velocity, and \(F_{\mathit{sf}}\) is the friction force calculated by Equation (40). The best values of the friction model are given in Table 2. \begin{table}
\begin{tabular}{c c} \hline
**Parameter** & **Original Value** \\ \hline Atmosphere pressure & 1 bar \\ Specific heat ratio & 1.4 \\ Thermal exchange coefficient & 500 J/mm\({}^{2}\)/K/s \\ External temperature & 293.15 K \\ External force & 100 N \\ Source pressure & 5 bar \\ Velocity of load & 0.003; 0.006; 0.01; 0.015; 0.02; 0.03; 0.05; 0.1; 0.15; 0.2; 0.25 m/s \\ \hline \end{tabular}
\end{table} 
Table 1: Parameters for simulation. Figure 17: Virtual test-rig of pneumatic cylinder. Figure 19: The value of cost function with respect to iteration. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Parameter** & **Extending** & **Retracting** \\ \hline \(F_{c}\) & \(4.338\) & \(-3.904\) \\ \(F_{s}\) & \(11.655\) & \(-9.906\) \\ \(v_{s}\) & \(0.4961\) & \(-0.372\) \\ \(\sigma\) & \(23.7\) & \(23.356\) \\ \(n\) & \(0.681\) & \(0.681\) \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Values of friction force model. Figure 18: Low chart of the genetic algorithm.