## 2 System Modeling
### Modeling of the Ball and Beam System  
The study goal is to provide precise ball position by controlling the stroke length of the IPA. The angle of the beam can be adjusted by moving the pneumatic actuator to keep the ball in a stable state after it has been in an unsteady state. The voltage from the resistance sensor is used to determine the position of the ball, while the position of the encoder is used to determine the angle of the beam, which is dependent on the pneumatic actuator stroke. The ball velocity and acceleration cannot be directly controlled easily due to the existing friction coefficient between the beam and the ball; similarly, it is not easy to directly control the PA stroke due to its nonlinearity. To construct a suitable controller for this system, it is important to derive the system dynamics equation. As illustrated in Figure 6, the beam is moved vertically (\(y\)-axis) by delivering torque from the right pneumatic actuator to the pivot at the left end. The ball is moved along the horizontal axis (\(x\)-axis) by the movement of the beam up and down. To simplify and linearize the model, all friction forces are ignored; the ball and the beam are always in contact, and there is no slippage when the ball is rolling on the beam. Table 2 presents the suggested system parameters. [PERSON]'s second law of motion is used to figure out the nonlinear mathematical description of the system. The system has two forces: a translational force (\(\mathrm{F_{tx}}\)) that acts under gravity in the x-direction, and a rotating force (\(\mathrm{F_{rx}}\)) caused by the torque from the rotational acceleration of the ball. Figure 6b illustrates the free-body depiction of the acceleration \(\frac{\mathrm{d^{2}x}}{\mathrm{d}t^{2}}\) along x as \(\tilde{\mathrm{x}}\), which corresponds to the force owing to translational motion as presented in Equation (2). \[\mathrm{F_{tx}}=\mathrm{m\ddot{x}} \tag{2}\]  
The torque generated by the spinning of the ball can be expressed as follows:  
\[\mathrm{T_{r}}=\mathrm{F_{rx}}\;\mathrm{R}=\mathrm{J}\frac{\mathrm{d}w_{\mathrm{ b}}}{\mathrm{dt}}=\mathrm{J}\frac{\mathrm{d}\left(\frac{v_{\mathrm{b}}}{\mathrm{R}} \right)}{\mathrm{dt}}=\mathrm{J}\frac{\mathrm{d}^{2}\left(\frac{\mathrm{x}}{ \mathrm{R}}\right)}{\mathrm{dt}^{2}}=\frac{\mathrm{J}}{\mathrm{R}}\tilde{ \mathrm{x}} \tag{3}\]  
where R is the radius of the ball. \begin{table}
\begin{tabular}{c c} \hline \hline
**Quantity** & **Value** \\ \hline Beam Length (I) & 0.5 m \\ Pneumatic Actuator Stroke Length (h) & 0–200 mm \\ Angle (\(\alpha\)) & Depends on h \\ The Ball Mass (m) & 0.04012 kg \\ The Ball Radius (R) & 0.0107 m \\ Ball’s Moment of Inertia (J) & \(1.8373\times 10^{-6}\) \\ Gravitational Acceleration (g) & 9.8 ms\({}^{-2}\) \\ \hline \hline \end{tabular}
\end{table} 
Table 2: IPABB system parameters. Figure 6: (a) IPABB system (b) Free body diagram. Equation (3) can so be restructured to provide the following:  
\[\mathrm{F_{rx}}=\frac{\mathrm{J}}{\mathrm{R^{2}}}\ddot{\mathrm{x}} \tag{4}\]  
where J denotes the moment of inertia of the ball, which can be expressed as Equation (5). \[\mathrm{J}=\frac{2}{5}\mathrm{m}\mathrm{R^{2}} \tag{5}\]  
Substituting Equation (5) into Equation (4) provides Equation (6):  
\[\mathrm{F_{rx}}=\frac{2}{5}\mathrm{m}\ddot{\mathrm{x}} \tag{6}\]  
When [PERSON]'s second law is applied to forces along an incline, Equation (7) is obtained:  
\[\mathrm{F_{rx}}+\mathrm{F_{rx}}=\mathrm{mg}\ \sin\ \alpha \tag{7}\]  
In Equation (7), m denotes the mass of the ball, g is the acceleration due to gravity, and \(\alpha\) denotes the angle of the beam. Equation (8) is obtained by substituting Equation (2) and Equation (6) into Equation (7). \[\frac{2}{5}\mathrm{m}\ddot{\mathrm{x}}+\mathrm{m}\ddot{\mathrm{x}}=\mathrm{mg} \sin\alpha \tag{8}\]  
Equation (8) can be restructured to provide Equation (9).