## 3 Results and Discussion
### Inverted Pendulum on a Cart Application  
The values of the parameters for the inverted pendulum model (1) used in simulation have been computed based upon the physical prototype, available at Tecnologico Nacional de Mexico--Instituto Tecnologico de La Laguna, which are collected in Table 2. The inverted pendulum on a cart, shown in Figure 7, is an experimental platform built by ourselves, which is a type of underactuated system of the inverted pendulum. This consists of a freely rotating rod (pendulum) mounted on top of a cart with linear horizontal movement. The cart is actuated by a belt system mounted inside the rail and powered by a Kollmorgen brushless servomotor AKM24F through a gear set connected to the belt. A digital encoder (US Digital) is mounted at the shaft of the freely rotating pendulum. The computer is a Windows-based system with a Sensoray 626 multifunction 16 bits analog/digital I/O card. The sampling time used for the control algorithm is 1 millisecond. Magnetic sensors and switches are used to avoid cart crashes at the ends of the rail. A Kollmorgen Digital Servo Amplifier S300 and a DC power supply is also used. \begin{table}
\begin{tabular}{c c c c c} \hline \hline \multirow{2}{*}{**Description**} & \multicolumn{3}{c}{**Notation**} & \multicolumn{2}{c}{**Value**} \\ \hline Mass of the cart & \(M\) & 2.024 [kg] \\ Mass of the pendulum & \(m\) & 0.338 [kg] \\ Length of the pendulum & \(L_{p}\) & 0.421 [m] \\ Length of the rail & \(L_{r}\) & 1.43 [m] \\ Length to the center of mass of the pendulum & \(l\) & 0.33 [m] \\ Moment of Inertia & \(l\) & 0.015 [kg/m\({}^{2}\)] \\ Viscous friction of the pendulum & \(f_{v0}\) & 0.003 [Nm seg/rad] \\ Viscous friction of the cart & \(f_{vx}\) & 6.33 [Nm seg/rad] \\ Coulomb friction of the cart (positive sense) & \(f_{cx+}\) & 28.1 [Nm] \\ Coulomb friction of the cart (negative sense) & \(f_{cx-}\) & 23.2 [Nm] \\ Gravity acceleration & \(g\) & 9.81 [m/seg\({}^{2}\)] \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Parameters of the experimental inverted pendulum on a cart system. \begin{table}
\begin{tabular}{c c c c c c} \hline \hline \multirow{2}{*}{**Input**} & \multirow{2}{*}{**Parameter**} & \multicolumn{3}{c}{**Optimization Algorithm**} \\ \cline{3-6}  & & **NOT OPT.** & **PSO** & **FFA** & **DE** \\ \hline \multirow{4}{*}{\(\theta\)} & \(\sigma_{Z}\) & 0.13 & 0.39 & 0.41 & 0.37 \\  & \(\sigma_{PS}\) & 0.13 & 0.61 & 0.73 & 0.65 \\  & \(\sigma_{PB}\) & 50 & 2.80 & 2.44 & 2.69 \\  & \(c_{PS}\) & 0.26 & 0.88 & 1.19 & 1.08 \\  & \(c_{PB}\) & 0.4 & 1.03 & 1.29 & 1.18 \\ \hline \multirow{4}{*}{\(x\)} & \(\sigma_{Z}\) & 0.07 & 0.58 & 0.83 & 0.59 \\  & \(\sigma_{PS}\) & 0.07 & 0.63 & 0.8 & 0.65 \\  & \(c_{PB}\) & 30 & 2.75 & 1.94 & 2.68 \\  & \(c_{PS}\) & 0.1 & 0.48 & 0.56 & 0.53 \\  & \(c_{PB}\) & 0.3 & 0.61 & 0.96 & 0.63 \\ \hline \multirow{4}{*}{\(\dot{\theta}\)} & \(\sigma_{Z}\) & 0.65 & 0.29 & 0.25 & 0.37 \\  & \(\sigma_{PS}\) & 0.65 & 0.56 & 0.52 & 0.56 \\  & \(\sigma_{PB}\) & 10 & 8.52 & 6.80 & 2.79 \\  & \(c_{PS}\) & 1.30 & 0.99 & 0.96 & 0.93 \\  & \(c_{PB}\) & 2 & 1.43 & 1.37 & 1.2 \\ \hline \multirow{4}{*}{\(\dot{x}\)} & \(\sigma_{Z}\) & 0.4 & 0.1 & 0.15 & 0.1 \\  & \(\sigma_{PS}\) & 0.4 & 0.11 & 0.1 & 0.1 \\ \cline{1-1}  & \(\sigma_{PB}\) & 6 & 12.24 & 12.55 & 9.8 \\ \cline{1-1}  & \(c_{PS}\) & 0.5 & 0.22 & 0.21 & 0.2 \\ \cline{1-1}  & \(c_{PB}\) & 0.55 & 0.32 & 0.33 & 0.42 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Parameters of the input membership functions. In the following activities for both simulation and real-time experiments, it is considered the addition of a swing-up controller which is in charge of approximating the pendulum to its unstable equilibrium point (0 [deg]) from the stable equilibrium point (\(-180\) [deg]), through short movements in the cart as it is outlined in Figure 8.  
Once the pendulum is near to its unstable equilibrium point, a switch to the full-state feedback adaptive fuzzy controller is performed.