# Control Strategies for Piston Trajectory in Ionic Compressors for Hydrogen Storage
## 2 Methodology and Numerical Model
### Numerical Model
Both the cylinder diameter and solid piston stroke were obtained as 0.055 m, while both the effective diameter of the inlet and discharge valves were calculated to be 0.004 m.  
A hydraulic drive subsystem was adopted to achieve hydrogen compression and piston trajectory control, as illustrated in Figure 3:2 In this subsystem, the model primarily employs a mechanical library, a hydraulic library, a hydraulic component design library, and a signal control library. The key predefined components used consist of hydraulic cylinders, pistons, directional valves, speed control valves, tanks, control signals, motors, and pumps. During the simulation, the electromagnetic reversing valve establishes the oil inlet and outlet positions of the oil cylinder, while the speed control component regulates the oil flow. The operating position of the electromagnetic directional valve and the valve opening size of the speed control component can then be controlled by adjusting the electrical signal, leading to the realization of the designed piston trajectory. The hydraulic cylinder was designed as a single-piston rod unit with a relief pressure of 31.5 MPa for the relief valve. As can be seen from the structure sketch of the compressor system, the cylinder piston's rod diameter \(D_{1}\) is equal to the cylinder piston's diameter \(D\). The hydraulic cylinder piston's diameter \(D_{2}\) can be calculated by Equation (9). Figure 3:3  
The pump speed \(n\) and pump displacement \(V_{d}\) determine the flow of hydraulic fluid into the hydraulic system. The pump displacement \(V_{d}\) is obtained using Equation (10). Figure 3:4where \(Q\) represents the theoretical flow rate transferring in, which can be calculated using Equations (11) and (12); and \(n_{m}\) is the motor speed, which is 1500 r/min in this design. Figure 3:5  
Figure 3:6  
The speed control valve comprises a constant differential pressure reduction valve and a throttle valve. The size of the valve opening can be regulated to control the flow of hydraulic oil entering and exiting due to a constant pressure difference across the throttle valve. In this study, the constant differential pressure reduction valve maintains a pressure difference of 0.8 MPa across both ends of the throttle valve. The maximum opening hydraulic diameter of the throttle valve can be calculated using Equations (13) and (14). Figure 3:7  
Figure 3:8  
where \(A_{r}\) is the maximum cross-sectional area of the flow; \(C_{q}\) is the flow coefficient; \(\Delta p\) is the throttle inlet and outlet differential pressure, which is the set value of the uniform-pressure-drop valve; and \(\rho\) is the density of hydraulic oil. Based on Equations (9)-(14), the key dimensions of the numerical model were then obtained and are summarized in Figure 3:9  
The pressure of the hydraulic fluid is calculated using Equation (15), considering the compressibility of the hydraulic fluid. Figure 4.0  
where \(\beta\) is the bulk modulus of the hydraulic fluid; and \(\frac{\mathrm{d}\rho}{\mathrm{d}t}\) is the differential of the density of the hydraulic fluid, which can be calculated using Equation (16). Figure 4.1  
where \(V\) and \(m\) are the volume and mass of the hydraulic fluid, respectively. The energy conservation during the compressor operation is shown in Equation (17) [36]. Figure 4.2  
where \(p\) is the gas pressure in the hydrogen compression chamber; \(V\) is the volume of the compression chamber; \(n\) is the number of moles of the gas; \(R\) is the gas constant; \(Q\) is the heat exchange energy; \(U\) is the thermodynamic energy; and \(W\) is the external output power. \begin{table}
\begin{tabular}{c c c} \hline
**Diameter of Hydraulic** & **Pump Displacement** & **Maximum Hydraulic** \\
**Cylinder Piston** & **(mL/r)** & **Diameter of Throttle Valve** \\
**(mm)** & **(mm)** & **(mm)** \\ \hline
80 & 175 & 13.5 \\ \hline \end{tabular}
\end{table} 
Table 2: Results of calculating the key parameters of the hydraulic drive section.