## 3 Derivation of a Mathematical Model  
The production of a safe physical prototype is quite complicated. Prototyping must be preceded by a great deal of scientific research (i.e., simulation computations) and manual work to meet the most important requirement: safety. The equation of motion describing the dynamic behavior of the mechanism can be derived by means of [PERSON]'s equations of motion of the second kind, which come from the principle of virtual work in the following form [36; 37; 38]:  
\[\frac{d}{dt}\left(\frac{\partial E_{K}}{\partial\dot{q}_{i}}\right)-\frac{ \partial E_{K}}{\partial q_{i}}+\frac{\partial E_{D}}{\partial\dot{q}_{i}}+ \frac{\partial E_{P}}{\partial q_{i}}=Q_{i},\;i=1,\;2,\;\ldots\;n, \tag{1}\]  
where \(E_{K}\) is the kinetic energy; \(E_{D}\) is the dissipative energy; \(E_{P}\) is the potential energy; \(q\) and \(\dot{q}\) are generalized coordinates and their time derivation (i.e., velocity), respectively; \(i\) is the number of degrees of freedom; and \(Q\) is the sum of external acting loads (forces from other types of mechanism excitation). Figure 5: The exact geometry of the connecting rod stone (**a**) and auxiliary stone (**b**) used to build a real engine prototype to verify its functionality. Figure 6: The exact geometry of the tube prototype used for the entry of the working medium into the cylinder space. To derive the mathematical model given by the equation of motion, we used the scheme shown in Figure 7.  
As the entire mechanism has one degree of freedom, we obtain one equation of motion. Firstly, we have to prescribe considered generalized coordinates. The coordinates of the rotating components are denoted as \(\varphi_{i}\), where the upper index \(i\) indicates individual components (Figure 7). Bodies acting with the translational movement have a generalized coordinate \(x\). As only one body moves translationally, only one coordinate \(x\) is used (Figure 7). Next, we proceed to determine the individual energies. We employ a certain level of simplification, such that friction will be considered only for some bodies. This friction is reflected in the dissipative energy formulation. The total kinetic energy of the mechanism \(E_{K_{tot}}\) equals the sum of kinetic energies of individual bodies \(\sum\limits_{i=1}^{n}E_{K_{i}}\) as follows:  
\[E_{K_{tot}}=\sum\limits_{i=1}^{n}E_{K_{i}},\ i=1,\ 2,\ \ldots,\ n, \tag{2}\]  
where \(n\) is the number of bodies. Hence, the resulting kinetic energy of the mechanism is given by the following formula:  
\[E_{K_{tot}}=\frac{1}{2}\cdot I_{1}\cdot\dot{\varphi}_{1}^{2}+\frac{1}{2}\cdot m _{1}\cdot\dot{x}_{1}^{2}+\frac{1}{2}\cdot I_{2}\cdot\dot{\varphi}_{1}^{2}+ \frac{1}{2}\cdot I_{3}\cdot\dot{\varphi}_{1}^{2}+\frac{1}{2}\cdot I_{4}\cdot \dot{\varphi}_{2}^{2}+\frac{1}{2}\cdot I_{5}\cdot\dot{\varphi}_{3}^{2}+\frac{1 }{2}\cdot I_{6}\cdot\dot{\varphi}_{4}^{2}, \tag{3}\]  
where \(I_{1}\), \(I_{2}\), \(I_{3}\), \(I_{4}\), \(I_{5}\), and \(I_{6}\) are the moments of inertia of individual bodies performing rotational movements (Figure 7a); \(m_{1}\) is the mass of the body performing a translation  
Figure 7: The calculation scheme of the mechanism: (**a**) a plane scheme of the designed mechanism with all components depicted; (**b**) a plane scheme of the designed mechanism with the components reduced to rotating components. movement; deviations \(\varphi_{1}\), \(\varphi_{2}\), \(\varphi_{3}\), and \(\varphi_{4}\) are the angular coordinates of individual bodies (Figure 7a); and \(x_{1}\) is a translation coordinate (Figure 7a). With the input (generalized coordinate \(\varphi_{2}\)) and the output (generalized coordinate \(\varphi_{1}\)), a gearbox with a ratio of \(i=2\) can be mounted. The gear ratio is expressed as follows:  
\[i=\frac{\varphi_{2}}{\varphi_{1}}. \tag{4}\]  
Then, we can express the generalized coordinate \(\varphi_{2}\) using the generalized coordinate \(\varphi_{1}\).