# Fuzzy-PID-Based Atmosphere Packaging Gas Distribution System for Fresh Food
## 2 Materials and Methods
### Gas Distribution Flow Control Model  
According to the requirements and control objectives of a fresh food gasification system, the gas distribution process must be dynamic, relying on mass flow controllers to adjust the flow of raw gas, so that the gas mixture reaches the set concentration ratio as soon as possible. A dynamic gas distribution method is able to continuously output a fixed concentration of gas by mixing the different gases according to the flow ratio, which better meets the requirements of gas distribution as it is used and does not require a large volume of storage tanks.  
For oxygen-free preservation, the gas distribution process consists of only two raw gases, CO\({}_{2}\) and N\({}_{2}\); the formula for calculating the gas mixture concentration is shown in Equation (1) [1].  
\[\alpha=\frac{Q_{1}}{Q_{1}+Q_{2}}\alpha_{1}+\frac{Q_{2}}{Q_{1}+Q_{2}}\alpha_{2} \tag{1}\]  
where \(\alpha\) is the gas concentration after mixing; \(\alpha_{1}\) is the first raw gas concentration; \(\alpha_{2}\) is the second raw gas concentration; \(Q_{1}\) is the first raw gas flow of material; and \(Q_{2}\) is the second raw gas flow.  
The gas distribution starts at the same time for both gases, as demonstrated in Equations (2)-(6).  
\[t_{2}=t_{1}=t \tag{2}\]  
\[Q_{1}=v_{1}\cdot t_{1} \tag{3}\]  
\[Q_{2}=v_{2}\cdot t_{2} \tag{4}\]  
\[v_{1}=\frac{\alpha-\alpha_{1}}{\alpha_{1}-\alpha_{2}}v \tag{5}\]  
\[v_{2}=\frac{\alpha_{1}-\alpha}{\alpha_{1}-\alpha_{2}}v \tag{6}\]  
where \(v_{1}\) is the flow rate of CO\({}_{2}\), and \(v_{2}\) is the flow rate of N\({}_{2}\).  
From the above equations, it is clear that the gas distribution times for the two gases are equal, so the required gas concentration can be obtained by directly regulating the gas flow rate. In this study, the N\({}_{2}\) flow rate is fixed to a certain value, and only the CO\({}_{2}\) flow rate is regulated, which simplifies the gas distribution process. Figure 2 shows the control flow of gas conditioning and preservation.  
Figure 1: Aquatic product processing and modified atmosphere packaging flow chart.  
The gas concentration ratio is regulated by the mass flow controller according to the gas distribution requirements [1]. During operation, the raw material gas comes out of the storage tank. The shunted gas enters a capillary tube. The gas flow is measured by a mass flow controller with temperature variation. The gas flow is controlled by real-time detection and comparison with a predetermined value. The opening size of the control valve is adjusted once the gas flow achieves the predetermined value [36]. The gas flow rate is monitored by the current or voltage from mass the flow controller in real time.  
In practice, the CO\({}_{2}\) ratio is calculated according to a pre-set CO\({}_{2}\) target concentration. The signal is then sent to the corresponding gas line. The required mixture gas is obtained by controlling the flow in the line with a closed-loop control. The gas concentration detection module detects the CO\({}_{2}\) concentration in the gas mixture in real time and sends a feedback signal to the controller. The control signal is sent to form a closed-loop negative feedback in the mass flow controller. The operating system of the gas distribution process is composed of a control module and a human-machine interaction module, which guides the operator through data monitoring and transmission for on-site operation or remote automatic control.