## 3 Method
### Gas and Oil Pressure Model  
During the operation of a diaphragm compressor, the pressures of hydraulic oil and gas undergo dynamic changes. The variation in gas pressure can be considered as a polytropic process, which can be described below [9].  
(1) Gas expansion stage  
\[\left\{\begin{array}{l}p_{g}(\alpha)V_{g}^{k_{m}}(\alpha)=p_{dg}V_{c}^{k_{m} }\\ V_{g}(\alpha)=V_{c}+V_{\rm hs}(\alpha)+V_{o}\frac{[p_{g}(\alpha)-p_{dg}]}{ \beta}\end{array}\right.\quad(0<\alpha<\alpha_{exp}) \tag{5}\]  
where \(p_{g}\) is the gas pressure. \(p_{dg}\) is the gas outlet pressure. \(V_{g}\) is the gas cavity volume. \(V_{o}\) is the total hydraulic oil volume. \(\beta\) is the oil bulk modulus. \(\alpha_{exp}\) is the rotational angle when the gas inlet valve opens, which is solved by  
\[p_{g}(\alpha_{exp})=p_{sg} \tag{6}\]  
(2) Gas suction stage  
\[p_{g}(\alpha)=p_{sg}\quad(\alpha_{exp}<\alpha<\pi) \tag{7}\]  
(3) Gas compression stage  
\[\left\{\begin{array}{l}p_{g}(\alpha)V_{g}^{k_{n}}(\alpha)=p_{sg}(V_{st}+V_{ c})^{k_{n}}\\ V_{g}(\alpha)=V_{in}+V_{c}-V_{\rm hs}(\alpha)-V_{o}\frac{[p_{g}(\alpha)-p_{sg}] }{\beta}\end{array}\right.\quad(\pi<\alpha<\alpha_{com}) \tag{8}\]  
where \(k_{n}\) is the compression index. \(V_{in}\) is the actual intake gas volume. \(p_{sg}\) is the gas inlet pressure. \(\alpha_{com}\) is the rotational angle when the outlet valve opens, which is calculated by  
\[p_{g}(\alpha_{com})=p_{dg}\quad(\pi<\alpha<\alpha_{com}) \tag{9}\](4) Gas discharge stage  
\[p_{g}(\alpha)=p_{dg}\quad(\alpha_{com}<\alpha<2\pi) \tag{10}\]  
The hydraulic oil is treated as a compressible fluid. During the gas expansion, suction, and compression stages, the oil pressure is set equal to the gas pressure. The hydraulic oil pressure during other stages can be mathematically described below [9].  
(1) Oil expansion stage  
Before the gas expansion process, the hydraulic oil under oil overflow pressure expands until it equals the residual gas's pressure. This process can be described as  
\[p_{o}(\alpha)=p_{do}-\frac{\beta}{V_{o}}V_{hs}(\alpha)\quad(0<\alpha<\alpha_{ oex}) \tag{11}\]  
where \(p_{o}\) is the oil pressure in the cavity. \(\alpha_{oex}\) is the rotational angle when the oil's expansion pressure equals the residual gas's pressure.  
(2) Oil compression stage  
\[p_{o}(\alpha)=p_{dg}+\frac{\beta}{V_{o}(\alpha_{oco})}[V_{hs}(2\pi)-V_{hs}( \alpha)]\quad(\alpha_{com}<\alpha_{oco}<\alpha<\alpha_{rel}) \tag{12}\]  
where \(\alpha_{oco}\) is the rotational angle when the oil pressure surpasses the gas pressure, which can be estimated by  
\[V_{hs}(\alpha_{oco})=\frac{\pi D_{op}^{2}L_{op}}{4}(1-\frac{p_{dg}-p_{at}}{ \beta})\quad(\pi<\theta<2\pi) \tag{13}\]  
where \(D_{op}\) is the diameter of the oil pump's plunger. \(L_{op}\) is the stroke of the oil pump's plunger. \(p_{at}\) is the atmospheric pressure. \(\alpha_{rel}\) is the rotational angle when the overflow valve opens, which could be estimated by  
\[p_{o}(\alpha_{rel})=p_{do} \tag{14}\]  
where \(p_{do}\) is the oil overflow pressure.  
(3) Oil discharge stage  
\[p_{o}(\alpha)=p_{do}\quad(\alpha_{rel}<\alpha<2\pi) \tag{15}\]  
Finally, combined with experiments, the gas pressure and oil pressure variations within a complete operational cycle can be mathematically obtained.