# Structure Optimization and Control Design of Electronic Oxygen Regulator
## 3 Control Method Design
### Simulation Results  
For the structural characteristics of the direct oxygen regulator, the performance of the direct oxygen regulator is analyzed by a simulation focusing on the pulmonary mechanism and pressure limiting mechanism, and the simulation structure is represented in Figure 6. The respiratory flow rate of the user varies approximately according to the sinusoidal law. A joint simulation of the model was implemented using amsim and simulink. The sampling time is 0.001 s. The parameters used in the simulation and their values are listed in Table 1.  
Oxygen supply is mainly achieved by stepper motors opening or closing the oxygen supply valve of the pulmonary mechanism. The simulation structure includes only the motor and its driven lung mechanism, the pressure limiting mechanism, and the breathing chamber. The principle of the pulmonary mechanism is mainly a motor pushing the pulmonary valve, and the simplified simulation mechanism is represented in Figure 6. The pressure profile of the output respiratory chamber fluctuates after a given respiratory pressure profile.  
It can be seen in Figure 7 that the pressure in the breathing chamber is essentially consistent with the reference pressure and that it follows this well.  
Combined with the single-neuron PID control strategy based on online identification of the RBF neural network, the sampling time in the simulation is 0.001 s and the main parameters are shown in Table 2. The network structure of the RBFNNI is 3-6-1, and the network input is \(x=[u(k)\ y(k)\ y(k-1)]\), \(\eta=0.2\), \(\alpha=0.05\). SNPID in taking \(K=6\), \(\eta_{1}=0.2\), \(\eta_{2}=0.001\), and \(\eta_{3}=0.1\).  
\begin{table}
\begin{tabular}{c c} \hline \hline
**Parameter** & **Value** \\ \hline Spring stiffness (N/m) & 470 \\ Volume of chamber (cm\({}^{3}\)) & 13 \\ Diameter of hole (mm) & 10 \\ Diameter of poppet (mm) & 15 \\ Orifice area (mm\({}^{2}\)) & 0.1 \\ \hline \hline \end{tabular}
\end{table}
Table 1: Structural parameters.  
Figure 6: Oxygen regulator simulation structure.  
At a lung ventilation rate of 44 L/min and inlet gas pressures of 40 kPa, 70 kPa, 150 kPa, and 300 kPa, the oxygen regulator outlet pressure curve is shown in Figure 8.  
The reference pressure is used as both the regulation target value and the dividing line of respiratory resistance. An outlet pressure value above the reference pressure indicates  
\begin{table}
\begin{tabular}{c c} \hline \hline
**Parameter (Unit)** & **Value** \\ \hline m (kg) & 0.037 \\ K (N/m) & 700 \\ d (m) & 0.07 \\ \(\Theta\) (\(\Upsilon\)) & 11 \\ R (\(\Omega\)) & 15 \\ K\({}_{\rm m}\) (N/A) & 23 \\ K\({}_{\rm E}\) (V/(m/s)) & 23 \\ V (m\({}^{3}\)) & 0.0005 \\ k & 1.4 \\ R\({}_{\rm g}\) (m\({}^{2}\)/(s\({}^{2}\)-K)) & 260 \\ Cd & 0.8 \\ \hline \hline \end{tabular}
\end{table}
Table 2: Main parameters in the simulation.  
Figure 8: Outlet pressure curve of the regulator with 44L/min ventilation.  
Figure 7: Respiratory chamber outlet pressure curve.  
expiratory resistance and an outlet pressure value below the reference pressure indicates inspiratory resistance. After entering the respiratory cycle, the desired outlet pressure should converge to the reference pressure. The peak pressure fluctuations in Figure 8 are between 0.1 kPa and \(-\)0.2 kPa. Near the positive and negative peak pressures, the outlet pressure is essentially the same; at the respiratory pressure transition, with an inlet pressure of 300 kPa, the regulator output pressure converges more closely to the reference pressure. Changes in the regulator's inlet gas pressure have little effect on the output pressure, and the oxygen regulator is able to output a stable pressure. When the inlet gas pressure is higher, the regulator output pressure is closer to the reference pressure.