Next Article in Journal
Research on Improved Retinex-Based Image Enhancement Method for Mine Monitoring
Previous Article in Journal
Review of Fault-Tolerant Control Systems Used in Robotic Manipulators
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Fuzzy-PID-Based Atmosphere Packaging Gas Distribution System for Fresh Food

1
Yantai Institute, China Agricultural University, Yantai 264670, China
2
College of Engineering, China Agricultural University, Beijing 100083, China
*
Author to whom correspondence should be addressed.
Appl. Sci. 2023, 13(4), 2674; https://doi.org/10.3390/app13042674
Submission received: 8 February 2023 / Revised: 17 February 2023 / Accepted: 17 February 2023 / Published: 19 February 2023

Abstract

:
The regulation process of gas distribution systems for atmosphere packaging has the characteristics of being nonlinear time varying and having hysteric delay. When the conventional proportional-integral-derivative (PID) control algorithm is applied to this kind of system, it is difficult to set the parameters as the process is time consuming and has poor reliability. For these reasons, this paper designs a gas distribution system for fresh food atmosphere packaging based on a fuzzy PID controller. The step response method is used to construct the system’s mathematical model under the given conditions and to optimize the gas distribution control flow. A simulation experimental platform to compare between the fuzzy PID controller and a conventional PID controller is designed, and the effectiveness of the fuzzy PID control strategy is verified, which proves that it can improve the performance of the monitoring system. The system can realize the remote monitoring of the gas distribution processes through the use of a mobile phone communication network. The data transmission is reliable, the operation is convenient, and, at the same time, the overall efficiency is improved. The results of the system simulation and the gas distribution for atmosphere packaging show that the fuzzy PID algorithm has a faster gas distribution speed and good environmental adaptability as the controller of the gas distribution system. The results show that the stability time of the fuzzy PID controller is about 38 s, while the stability time of the conventional PID controller is about 85 s. The concentration error of fresh gases is ±0.25% floating, the accuracy is increased by 12 times, and the gas distribution speed is increased by about 50% when the system is stable.

1. Introduction

In recent years, consumer demand for fresh food has increased substantially, and research on fresh food preservation technology has become a popular issue in the field of food quality and safety. Modified atmosphere preservation (MAP) is a technique that has been utilized to extend the shelf life of fresh food by manipulating the ratio of gases present in storage, transportation, and packaging environments [1,2,3,4,5]. MAP could maintain specific temperature and pressure conditions. It primarily employs the use of three gases, CO2, N2, and O2, to inhibit the respiration of microorganisms by utilizing high concentrations of CO2 and controlling their reproduction [6,7,8,9,10]. N2 is employed to replace O2 as the filling gas to maintain an optimal gas environment. For processed fresh foods, oxygen-free packaging is utilized. Fresh-keeping gases are typically of high purity, with concentrations of 99.9% CO2 and N2. However, traditional manual gas distribution is easy to leak so that it may affect human health [6,7,8,9,10]. As such, the automatic monitoring of modified atmosphere preservation and distribution systems has become a crucial issue that must be addressed.
The automatic monitoring of gas distribution processes poses several challenges, including (1) the traditional open-loop controlled gas distribution process is unreliable and, thus, requires the implementation of an effective closed-loop control system. (2) Even with closed-loop control, the gas distribution process is susceptible to interference from various factors, which could negatively impact the system’s stability, resulting in an inability to reach the desired accuracy in mixing gases. Therefore, a reliable control algorithm is necessary. (3) The adjustment of each gas using a control algorithm during the gas distribution process could further degrade the system’s stability, and this presents a significant problem in decoupling mutually affected gases. (4) Conventional proportional-integral-derivative (PID) control algorithms are insufficient for nonlinear, time-varying, and hysteresis-delay systems, as they are time consuming, unreliable, and inefficient in setting the parameters [11,12,13,14,15,16,17,18,19,20,21]. To address these issues, it is essential to design more intelligent PID control algorithms for use in the actual control process.
At present, various intelligent PID algorithms are available for use, including expert PID control algorithms, fuzzy PID control algorithms, and neural network PID control algorithms. These algorithms are highly adaptable to time-varying, nonlinear, and hysteresis-delay systems [22,23,24,25]. Expert PID control algorithms have been applied to control simulation systems by modifying the control rules manually [26,27,28]. Neural network PID control algorithms have the advantages of fast adjustment and high accuracy, but most of the research is still in the simulation stage due to the complexity of these algorithms [29,30,31]. The fuzzy PID control technology has been found to be particularly well-suited for the system requirements of modified atmosphere preservation and automatic gas distribution in similar aquatic products. It not only improves the accuracy and rapid adjustment of such system, but its algorithm also has a high logic. At the same time, it could be embedded in a controller by looking up tables to achieve the development and implementation of the system [24,25,32]. For example, Azaza et al. [33] designed an intelligent greenhouse control system which utilized fuzzy logic control of temperature, humidity, and CO2 concentration, resulting in a 22% reduction in total energy consumption and a 33% reduction in water consumption during testing. Vasu [34] designed an industrial robot control system that adjusts the direction and joint angle of an end effector, and the performance was found to be superior than that of the traditional PID controller. In addition, various studies have been conducted using fuzzy PID control technology for other applications. For example, Priyanka et al. [35] designed an automatic oil flow adjustment system with a fuzzy PID controller, which achieved automatic adjustment of oil output flow and was found to perform better than a cascade PID controller.
Given the adaptability of fuzzy PID algorithms to time-varying control systems and mathematical models, this paper proposes an atmosphere packaging gas distribution system for fresh food based on a fuzzy PID control algorithm for specific application scenarios. The system’s mathematical model was constructed using the step response method under a given set of conditions, and the gas distribution control process was optimized. The control strategy’s effectiveness in improving the performance of the gas distribution monitoring system was verified through comparative simulation experiments of the fuzzy PID control and traditional PID control algorithms. The gas distribution process could be remotely monitored by using mobile devices with a fourth-generation mobile communication technology standard (4G) network.

2. Materials and Methods

The gas distribution process, the gas distribution flow control model, the system data transmission and architecture, the fuzzy PID algorithm, and the system implementation are presented in this section.

2.1. Gas Distribution Process Analysis

The gas preservation processes for different kinds of fresh food are different, but all of them need to perform some processing before gas preservation packaging and then sale. Through a review of research on the workflow of fresh food gas preservation, it could be seen that the whole production line includes raw material preparation, gas distribution control, and then aeration and packaging. The workflow chart is described in Figure 1. The research work of this paper focuses on the second stage, gas distribution and control process, including the realization of fresh gas preparation and flow control, the construction of data management and the transmission system, the optimization of the control model and fuzzy PID control mechanism, and finally the automatic monitoring and system integration of fresh gas distribution and mixing.

2.2. 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, CO2 and N2; the formula for calculating the gas mixture concentration is shown in Equation (1) [1].
α = Q 1 Q 1 + Q 2 α 1 + Q 2 Q 1 + Q 2 α 2
where α is the gas concentration after mixing; α 1 is the first raw gas concentration; α 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
Q 1 = v 1 t 1
Q 2 = v 2 t 2
v 1 = α α 1 α 1 α 2 v
v 2 = α 1 α α 1 α 2 v
where v 1 is the flow rate of CO2, and v 2 is the flow rate of N2.
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 N2 flow rate is fixed to a certain value, and only the CO2 flow rate is regulated, which simplifies the gas distribution process. Figure 2 shows the control flow of gas conditioning and preservation.
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 CO2 ratio is calculated according to a pre-set CO2 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 CO2 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.

2.3. System Data Transmission and Architecture

The complete automatic gas distribution line consists of four sub-systems: the operation terminal system, the data transmission and management system, the feedback control system, and the gas distribution execution system. Based on the analysis of the demand for automatic gas distribution for fresh food preservation, this paper designs a 4G network-based automatic gas distribution data transmission, monitoring, and storage system. Its main functions are shown below. Figure 3 illustrates the data transmission architecture of the gas distribution system.
(1)
Real-time data transmission: the gas concentration and flow rate are monitored in real time by the gas conditioning and preservation gas distribution system, and the data are transmitted to the working terminal and return control system.
(2)
Data recording and storage: the historical data are stored so that it would be convenient to check them.
(3)
Data maintenance management: the on-site gas concentration and flow rate data could be transmitted to the cloud server.
(4)
Completion of on-site equipment correlation, adjustment, corresponding data storage, etc.
The remote data transmission and monitoring of the gas distribution system is realized by using a 4G DTU with the recommended standard 485 (RS485) communication. The sensor data could then be stored in a cloud platform or at the work terminal, and the set control data or command could be sent to the programmable logic controller (PLC) in turn. This enables the remote control of the gas distribution system.
With the data transmission and conversion protocols, a conventional 4G network can be used to enable the gas distribution system to send commands from the working terminal to the PLC to complete the acquisition and distribution of various types of data. In this paper, 4G is chosen as the communication network for two reasons: (1) the communication modules supporting the 5th-generation mobile communication technology (5G) are not mature yet, while 4G-based products are inexpensive and widely available, and (2) a 4G network can already achieve data transmission in millisecond, which can fully meet the requirements for reliability and efficiency. Therefore, it is more economical and reliable to choose communication modules based on 4G technology, and the system is designed with future communication network upgrades in mind, leaving space for 5G and more efficient communication technologies in the future.

2.4. Fuzzy PID Algorithm

In the entire line of the packaging gas distribution system, the key problem is to meet the precise requirements to optimize the control model and regulation mechanism. Achieving this goal depends on the establishment of reliable and efficient control models and algorithms. A fuzzy PID controller, which aims to achieve the adjustment of PID parameters through fuzzy logic control, is applied to improve the control feedback accuracy and efficiency of the system.

2.4.1. Principle of Fuzzy PID

As is well known, conventional PID is mainly composed of three links: proportional, integral, and differential. Additionally, the regulation of the system is all based around the error between the feedback value and the set value of the system. The formula is as follows:
u ( t ) = K p e ( t ) + K P T i e ( t ) d t + K P T d d e ( t ) d t
where K p is the coefficient of the proportional link; K i = K p T i is the coefficient of the integration link; and K d = K p T d is the coefficient of the differential link. The effect of K p is that K p causes the error to change in the direction of reduction when the system is in error. When K p is too small, the system approaches the step value more slowly and takes longer to stabilize. Excessive K p , although faster to regulate, can result in excessive overshoot, making the system less stable. Only by choosing the right K p can the overshoot and the steady-state error be reduced and the speed of regulation be improved.
The function of the integral link coefficient K i is to eliminate the steady-state error of the system by adjusting the coefficient. When K i is too large, the output of the control system is unstable and produces oscillations; too small a K i , although stable, makes it take longer to eliminate the error, resulting in an increase in the regulation time of the system.
The function of the differential link coefficient K d is to increase the speed of regulation, reduce the amount of overshoot, and improve the stability of the system.
Compared to conventional PID, the fuzzy PID control algorithm is characterized by its higher efficiency and accuracy in the control of closed-loop systems with negative feedback. It obtains the system deviation e and deviation rate of change e c by comparing the real-time detection value with the preset value through the feedback loop. The deviation e and deviation rate of change e c are used as inputs to the fuzzy PID control algorithm, and then the proportional link coefficient K p , the integral link coefficient K i , and the differential link coefficient K i are updated in real time through fuzzy logic control methods (fuzzification, fuzzy inference, and defuzzification) to obtain the optimal parameters. The online self-tuning of the PID control parameters is achieved. The initial values of the fuzzy PID controller is also obtained according to the stable PID control parameters. Therefore, the fuzzy PID control algorithm not only shows a significant improvement in system control accuracy and efficiency compared to conventional PID, but it also shows a significant improvement in robustness [37,38,39,40]. The schematic diagram of the fuzzy PID controller structure is shown in Figure 4.

2.4.2. Fuzzy PID Controller Design for Gas Distribution Systems

To establish a fuzzy PID controller, the first step is to select the input parameters and establish the corresponding affiliation functions, that is, to construct independent rule sets for K p , K i , and K d , respectively. With the corresponding rule sets, the controller can adapt to the changes of parameters in a regular manner [41,42,43].
(1)
Fuzzy linguistic variables and fuzzy design
If the CO2 concentration in the aquatic product gas distribution system is set as y , the detection value is g , the deviation is e , then e = y g , the rate of change in error is e c = y g t , and the flow output of the mass flow controller is u .
The program for fuzzy logic reasoning consists of fuzzy control languages, each of which contains the input and output variables of the fuzzy controller and their states, such as ‘negative neutral’, ‘medium’, and ‘positive neutral’. The fuzzy design means that the deviation e of the input variable CO2 concentration value; the rate of change e c of the deviation; and the output variables, including the proportional coefficient correction Δ K p , the integral coefficient correction Δ K i , and the differential coefficient correction Δ K d , are represented by the fuzzy vocabulary {negative large, negative medium, negative small, medium, positive small, positive medium, positive large}, briefly expressed as {NB, NM, NS, ZO, PS, PM, PB}.
According to the target aquatic product’s gas preservation requirements, the basic theoretical domain for the concentration error e of the gas distribution system chosen for this study is [−60%, 60%]. The fuzzy design is such that A = {−6,−5,−4,−3,−2,−1,0,1,2,3,4,5,6} as the domain of E . Then, the quantization factor of the concentration error e of the gas distribution system is 0.1. The variable language of E corresponds to its theoretical domain: negative large NB, negative medium NM, negative small NS, medium ZO, positive small PS, positive medium PM, and positive large PB. Similarly, the basic theoretical domain [−6%, 6%] for the rate of change of the error e in the gas distribution system. If B = {−6,−5,−4,−3,−2,−1,0,1,2,3,4,5,6} is the theoretical domain of e c , then the quantization factor of e is 1. The change in E is similarly expressed in the variable language of NB, NM, NS, ZO, PS, PM, and PB.
Empirically, the basic domain of the scale factor correction quantity Δ K p can be set to [−0.6, 0.6], and if C = {−6,−5,−4,−3,−2,−1,0,1,2,3,4,5,6} is the domain of Δ K p , then the scale factor of Δ K p is 0.1. The basic domain of the integral factor correction Δ K i is set to [−0.006, 0.006], and if D = {−6,−5,−4,−3,−2,−1,0,1,2,3,4,5,6} is the domain of Δ K i , then the scale factor of Δ K i is 0.01. The fundamental domain of the integral coefficient correction Δ K d is set to [−0.6, 0.6], and if we let F = {−6,−5,−4,−3,−2,−1,0,1,2,3,4,5,6} be the domain of Δ K d , then the scale factor of Δ K d is 0.1. For Δ K p , Δ K i , and Δ K d , the fuzzy rules are also represented in the language of variables in the form of NB, NM, NS, ZO, PS, PM, and PB.
After the fuzzification process, the solution can be solved directly using the MATLAB software. The software comes with its own fuzzy logic editor, as shown in Figure 5.
The fuzzy PID controller is designed as a structure with two inputs and three outputs according to the gas mixture distribution system. The membership function of E , E c , Δ K p , Δ K i , and Δ K d are obtained by using a trigonometric function as the membership function of all variables because a trigonometric function is simple and convenient to apply to an actual controller. The membership functions are shown in Figure 6 and Figure 7.
(2)
Fuzzy rule design and defuzzification
With the CO2 concentration error E , the rate of change in the error E c , and the affiliation functions of the proportional coefficient correction Δ K p , the integral link coefficient correction Δ K i , and the differential link coefficient correction Δ K d available, a table of fuzzy rules for Δ K p , Δ K i , and Δ K d can be established based on the corresponding fuzzy subsets, as shown in Table 1, Table 2 and Table 3. The determination of the fuzzy rules is generally based on the system characteristics and the opinions of domain experts obtained from previous interviews. Appropriate fuzzy rules have a great role in improving the speed of regulation, reducing errors, and improving the robustness of the system.
The corresponding fuzzy sets can be obtained according to the fuzzy rules [32,33,34]. The fuzzy rule sets consist of fuzzy control language instructions based on the requirements of the control target, which are expressed as follows:
1.
If (E is ZO) and (Ec is PS), then (∆Kp is NS), (∆Ki is PM), and (∆Kd is NS).
2.
If (E is ZO) and (Ec is NS), then (∆Kp is PS), (∆Ki is NS), and (∆Kd is NS).
3.
If (E is NS) and (Ec is PS), then (∆Kp is ZO), (∆Ki is ZO), and (∆Kd is NS).
4.
If (E is NB) and (Ec is ZO), then (∆Kp is PS), (∆Ki is NS), and (∆Kd is NB).
5.
If (E is NS) and (Ec is ZO), then (∆Kp is PS), (∆Ki is NS), and (∆Kd is NM).
 
................................................
 
................................................
 
................................................
49.
If (E is PM) and (EC is NS), then (∆Kp is NS), (∆Ki is PS), and (∆Kd is PS).
According to the fuzzy rule tables, each fuzzy control command corresponds to a fuzzy relationship, with 49 in total. For the actual operation, the fuzzy PID controller uses the Mamdani algorithm for fuzzy inference because of the simplified setting of the control parameters.
After determining the fuzzy set of PID parameter increments, the next step is to select the weighted averaging method for defuzzification through the MATLAB’s fuzzy logic editor (Mathorks Incorporated, Massachusetts Natick, MN, USA). The specific formula is as follows:
Δ K a = i = 1 n μ Δ K n ( z i ) z i i = 1 n μ Δ K a ( z i )
where Δ K a represents the exact amount after the defuzzification of Δ K p , Δ K i , and Δ K d ; z i is the weight, which is the value in the quantization domain; and μ Δ k n ( z i ) is the affiliation value obtained from the affiliation function. The exact quantities of the three PID parameter increments are obtained and can be summed with the initially rectified proportional, integral, and differential coefficients to obtain the updated parameters.
According to the fuzzy rules, the defuzzification is performed and the fuzzy PID controller automatically generates the results, as shown in Figure 8. According to the above rules, the value of E and E c can be manually entered to verify the change in the magnitude of Δ K p , Δ K i , and Δ K d . It is also possible to view a 3D model plot of Δ K p , Δ K i , and Δ K d , as shown in Figure 9.
Defuzzifying the fuzzy sets of Δ K p , Δ K i , and Δ K d using the weighted average method obtains the exact values of the proportional, integral, and differential coefficient increments K p , K i , and K d . A two-input, three-output fuzzy PID controller is obtained by using the fuzzy logic editor in MATLAB to fuzzify the variables, construct the fuzzy inference rules, and then defuzzify.

2.5. System Implementation

Upon the completion of the analysis of the modified atmosphere preservation gas distribution system, including the implementation of a feedback control system, the selection of an appropriate communication mode, and the design of the necessary software, the system can be integrated and undergo functional testing.

2.5.1. Gas Distribution System Implementation

The main component architecture of the modified atmosphere preservation gas distribution system is demonstrated in Figure 10.
The system depicted in the figure comprises various components, including a PLC controller (Siemens S7-200), a mass flow controller (LF 420-S), analog-to-digital and digital-to-analog conversion modules (EM AM06), a CO2 sensor, a touch screen, an intermediate relay, a solenoid valve, a 4G DTU module, and a power supply module. The physical configuration of the individual components is demonstrated in Figure 11.
In the system for distributing gas, the PLC transmits the signals to the various working modules to execute the entire control process. During routine operation, the desired mixed gas concentration and output flow are set by workers. The system then transmits the specified parameters to the PLC, uploads the data to the cloud server, and sends them to the PLC via the 4G DTU. The PLC calculates the flow rate for the N2 gas path and sends the data to the mass flow controller. The mass flow controller then controls the flow rate. To achieve efficient gas distribution, the flow rate of N2 is fixed, while the flow rate of CO2 is separately controlled to adjust the mixed gas concentration. The gas concentration is detected by the CO2 sensor and transmitted to the PLC. By comparing the detected gas concentration to the set value, the deviation of the CO2 concentration is calculated, and this deviation serves as the input for the PID controller. The CO2 flow rate is then adjusted by the PID. Once the PID adjustment reaches stability, the process of gas distribution is complete. Figure 12 illustrates the flow of the gas distribution process.

2.5.2. System Protocol

After the final assembly of the modified atmosphere preservation gas distribution system, it is necessary to conduct testing to evaluate the overall function, accuracy, and reliability of the system. This testing is performed by evaluating the local function and reliability of each sub-system, as well as by examining the status of the physical system’s gas distribution control interface and the parameter real-time monitoring interface of the gas distribution system, as shown in Figure 13 and Figure 14. The overall system test includes a variety of aspects, such as evaluating the effectiveness of the fuzzy PID controller; determining if the gas distribution accuracy of the system meets quality requirements in an actual working environment; assessing the stability and reliability of the system’s working process; and determining if the reliability and accuracy of data transmission and communication meet standards after system integration. The specific protocol for testing includes determining the system transfer function by using the measured method; obtaining the proportion, integral, and differential coefficients by using the system transfer function and the PID algorithm’s parameter-tuning empirical formula; and adjusting the tuning parameters to obtain appropriate PID parameters for the conventional PID controller. Furthermore, it includes a simulation comparison test of the conventional PID controller and the fuzzy PID controller, testing the gas distribution accuracy, system stability, and data transmission and communication reliability of the integrated system. Lastly, the controls and experimental groups are established according to working conditions and testing requirements for the test.

3. Results and Discussions

3.1. Parameter Identification and Analysis of the Control Model

There are several methods for obtaining the mathematical model of an actual control system, such as the step response method, the approximation method of empirical formula, the two-point method, the semi-logarithmic method, and the tangent method. The response curve of the modified atmosphere preservation gas distribution system for aquatic products is an S-shaped curve, which belongs to a first-order pure hysteresis system. Therefore, the step response method was chosen to obtain a mathematical model of the gas distribution system. By inputting a step signal and setting the CO2 concentration to 60% and the initial data to 0.2%, a system curve is obtained, as shown in Figure 15. The gas distribution system has a stable value of 57.2% and a delay time of 7 s. The model can be obtained using the step response method based on Equation (9):
0.94 e 7 s 25 S + 1

3.2. Fuzzy PID Controller Simulation Analysis

The primary objective of this study is to implement a modified atmosphere preservation gas distribution system utilizing fuzzy PID control; thus, its actual performance is evaluated through simulation experiments. A simulation experimental platform is constructed in the Simulink function of the MATLAB software based on the transfer function of the gas distribution system, which allows for a comparison of the performance of the fuzzy PID controller with that of a traditional PID controller, as illustrated in Figure 16.
To evaluate the adaptability of the fuzzy PID controller and the traditional PID controller to the gas distribution system under different parameter conditions, four comparison groups with step values of 30, 40, 50, and 60 were established. The results, as shown in Figure 17, reveal that the stabilization time of the fuzzy PID controller (represented by the red curve) is around 38 s, while that of the traditional PID controller (represented by the blue curve) is around 85 s. It can be observed that the fuzzy PID controller reaches a steady state more quickly and is able to adjust faster than the traditional PID controller.
As illustrated by each graph, the traditional PID controller (represented by the blue curve) initially exceeds the setpoint and gradually returns to it, while the peak of the fuzzy PID controller (represented by the red curve) aligns with the setpoint. This demonstrates that the fuzzy PID controller is capable of achieving minimal overshoot during gas distribution. In general, the fuzzy PID controller demonstrates superiority over the traditional PID controller in terms of increasing the speed of gas distribution, enhancing the accuracy of gas distribution, reducing overshoot during gas distribution, and adapting to the different parameters of the gas distribution system.

3.3. Gas Distribution System Performance

The assessment of the performance of the gas distribution system includes evaluating three key metrics: the precision of gas distribution; the stability and dependability of the gas distribution system; and the reliability of data transmission and communication within the system.
The examination of the gas distribution system is divided into two groups, primarily to evaluate the efficacy of a PID controller in enhancing the precision of gas distribution. The test conditions and indicators of gas distribution include a flow output of 3000 sccm and concentrations of CO2 at 20%, 30%, and 40%, as well as a flow output of 4000 sccm and concentrations of CO2 at 50% and 60%. The results indicate that the average error of the gas distribution system without the utilization of a PID algorithm is 2.64%. However, the implementation of a PID algorithm results in an average error of 0.22%, representing a 12-fold improvement in the accuracy of the gas distribution system. Additionally, the utilization of a PID algorithm results in a 50% reduction in gas distribution time, resulting in a significant increase in work efficiency.
In order to evaluate the stability of the system under varying parameters, a series of gas distribution experiments were conducted using a fuzzy PID control mechanism. Four distinct sets of experiments were performed, each with a different gas concentration index and output flow. The concentration of CO2 in each set was 30%, 40%, 50%, and 60%, respectively, while the concentration of N2 was 70%, 60%, 50%, and 40%, respectively. The output flow for each set was fixed at 4000 sccm. The data acquisition cycle for the gas concentration was 1 s, and the data were continuously collected for 300 s, resulting in a total of 1200 data points. The results indicate that the gas concentration remains within a range of 30.0% ± 0.3%, 40% ± 0.3%, 50.0% ± 0.2%, and 60% ± 0.2% for each respective set, thus demonstrating the good stability of the gas distribution system under the fuzzy PID control mechanism.
The gas distribution remote monitoring system developed in this study employs a 4G DTU as the communication module. The reliability and accuracy of communication transmission, such as packet loss rate and accuracy rate, were evaluated and calibrated before deployment. The system was tested under the conditions of a communication distance of 1200m, a communication time of 20 min, a temperature range of 23–33 degrees Celsius, and a humidity range of 35~45%. The packet loss rate and accuracy rate of the system under the RS485 interface were found to be satisfactory, with no garbled characters and no packet loss. Furthermore, when the system was subjected to continuous transmission for 110 h, with a baud rate of 115,200, number of bytes sent of 1000, and transmission interval of 1000 microseconds, the packet loss rate of data transmission was found to be between 0.74 and 0.77%. These results demonstrate that the reliability of the system’s data transmission and communication can be fully guaranteed. The results show that by setting the data collection interval at seconds on the cloud server, the data transmission delay is approximately 15 ms, and the gas distribution system is able to accurately complete remote real-time monitoring with stable, normal, and accurate communication.

4. Conclusions

This paper addresses the technical challenges associated with the automation and remote monitoring of gas distribution by integrating modified atmosphere preservation technology, intelligent control, and network communication technology. The progress made in this work includes the design of a logical system structure that meets the requirements for modified atmosphere preservation and remote automation of gas distribution. It also provides a study on preparation and flow control, data management and communication, and gas distribution optimization control models and regulation mechanisms. The resulting system is capable of automatic monitoring and integration of fresh food’s modified atmosphere preservation in a gas distribution system. The gas distribution system utilizes a fuzzy PID control algorithm and a mass flow controller to control the air path flow. Remote data transmission is facilitated by utilizing a 4G network, and remote monitoring is achieved through a mobile phone application software. The system demonstrates a mixing gas concentration error of ±0.25% and an increased gas distribution speed of approximately 50%.
The system still has room for further optimization, such as improving the automatic gas distribution control process for modified atmosphere preservation, and enhancing the expert knowledge base of fuzzy rules in the design of the fuzzy PID controller. Additionally, the design of fuzzy rules, the acquisition of scale factors and quantization factors, and the consideration of more actual scene characteristics are areas that could be further explored. The proposed system has potential application in many kinds of food preservation using MAP gas distribution to improve the precision, quality, and safety of fresh food in storage or in supply chain.

Author Contributions

Conceptualization: H.Z.; Methodology: X.Z.; Software: B.W.; Validation: X.Z. and J.F.; Investigation: B.S., B.W. and J.F.; Writing—original draft: H.Z.; Writing—review and editing: X.X.; Visualization: B.S.; Supervision: X.X. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

Not applicable.

Acknowledgments

This research is supported by the 2115 talent development program of China Agricultural University.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Zhang, H.; Zuo, X.; Zhang, L.; Liang, B.; Li, X. Automatic gas dynamic volumetric system for aquatic products’ MA preservation. Comput. Electron. Agric. 2022, 199, 107188. [Google Scholar] [CrossRef]
  2. Ariyamuthu, R.; Albert, V.R.; Je, S. An Overview of Food Preservation Using Conventional and Modern Methods. J. Food Nutr. Sci. 2022, 10, 70. [Google Scholar] [CrossRef]
  3. Wang, S.; Liu, Z.; Zhao, M.; Gao, C.; Wang, J.; Li, C.; Dong, X.; Liu, Z.; Zhou, D. Chitosan-wampee seed essential oil composite film combined with cold plasma for refrigerated storage with modified atmosphere packaging: A promising technology for quality preservation of golden pompano fillets. Int. J. Biol. Macromol. 2023, 224, 1266–1275. [Google Scholar] [CrossRef] [PubMed]
  4. Bumbudsanpharoke, N.; Ko, S. Packaging technology for home meal replacement: Innovations and future prospective. Food Control 2021, 132, 108470. [Google Scholar] [CrossRef]
  5. Saeed, R.; Feng, H.; Wang, X.; Zhang, X.; Fu, Z. Fish quality evaluation by sensor and machine learning: A mechanistic review. Food Control 2022, 137, 108902. [Google Scholar] [CrossRef]
  6. Qian, Y.-F.; Liu, C.-C.; Zhang, J.-J.; Ertbjerg, P.; Yang, S.-P. Effects of Modified Atmosphere Packaging with Varied CO2 and O2 Concentrations on the Texture, Protein, and Odor Characteristics of Salmon during Cold Storage. Foods 2022, 11, 3560. [Google Scholar] [CrossRef] [PubMed]
  7. Jeong, G.; Kim, H.M.; Kim, J.; Kim, J.S.; Park, H.W. Effect of storage conditions on the shelf-life extension of fungus-colonized substrates based on Metarhizium anisopliae using modified atmosphere packaging. Sci. Rep. 2022, 12, 1–8. [Google Scholar]
  8. Atallah, A.A.; Ismail, E.A.; Yehia, H.M.; Elkhadragy, M.F.; Khater, E.-S.G. Proteolytic Development and Volatile Compounds Profile of Domiati Cheese under Modified Atmosphere Packaging. Fermentation 2022, 8, 358. [Google Scholar] [CrossRef]
  9. Katsouli, M.; Semenoglou, I.; Kotsiri, M.; Gogou, E.; Tsironi, T.; Taoukis, P. Active and Intelligent Packaging for Enhancing Modified Atmospheres and Monitoring Quality and Shelf Life of Packed Gilthead Seabream Fillets at Isothermal and Variable Temperature Conditions. Foods 2022, 11, 2245. [Google Scholar] [CrossRef]
  10. Zhang, X.-J.; Zhang, M.; Chitrakar, B.; Devahastin, S.; Guo, Z. Novel Combined Use of Red-White LED Illumination and Modified Atmosphere Packaging for Maintaining Storage Quality of Postharvest Pakchoi. Food Bioprocess Technol. 2022, 15, 590–605. [Google Scholar] [CrossRef]
  11. Huang, W.; Wang, X.; Zhang, J.; Xia, J.; Zhang, X. Improvement of blueberry freshness prediction based on machine learning and multi-source sensing in the cold chain logistics. Food Control 2023, 145, 109496. [Google Scholar] [CrossRef]
  12. Zhu, Z.; Ma, R.; Draganic, A.; Orovic, I.; Zhang, X.; Wang, X.; Wang, J. Postharvest quality monitoring and cold chain management of fresh garlic scapes based on a wireless multi-sensors system. J. Food Process. Eng. 2021, 45, e13918. [Google Scholar] [CrossRef]
  13. Xiao, X.; Mu, B.; Cao, G.; Yang, Y.; Wang, M. Flexible battery-free wireless electronic system for food monitoring. J. Sci. Adv. Mater. Devices 2022, 7, 100430. [Google Scholar] [CrossRef]
  14. Wang, X.; Feng, H.; Chen, T.; Zhao, S.; Zhang, J.; Zhang, X. Gas sensor technologies and mathematical modelling for quality sensing in fruit and vegetable cold chains: A review. Trends Food Sci. Technol. 2021, 110, 483–492. [Google Scholar] [CrossRef]
  15. Fan, L.; Su, H.; Wang, W.; Zio, E.; Zhang, L.; Yang, Z.; Peng, S.; Yu, W.; Zuo, L.; Zhang, J. A systematic method for the optimization of gas supply reliability in natural gas pipeline network based on Bayesian networks and deep reinforcement learning. Reliab. Eng. Syst. Saf. 2022, 225, 108613. [Google Scholar] [CrossRef]
  16. Ricardianto, P.; Barata, F.A.; Mardiyani, S.; Setiawan, E.B.; Subagyo, H.; Saribanon, E.; Endri, E. Supply chain management evaluation in the oil and industry natural gas using SCOR model. Uncertain Supply Chain Manag. 2022, 10, 797–806. [Google Scholar] [CrossRef]
  17. Chen, Y.; Tian, Z.; He, R.; Wang, Y.; Xie, S. Discovery of potential risks for the gas transmission station using monitoring data and the OOBN method. Reliab. Eng. Syst. Saf. 2023, 232, 109084. [Google Scholar] [CrossRef]
  18. Feng, H.; Wang, W.; Chen, B.; Zhang, X. Evaluation on Frozen Shellfish Quality by Blockchain Based Multi-Sensors Monitoring and SVM Algorithm During Cold Storage. IEEE Access 2020, 8, 54361–54370. [Google Scholar] [CrossRef]
  19. Wang, M.; Xu, Y.; Yang, Y.; Mu, B.; Nikitina, M.A.; Xiao, X. Vis/NIR optical biosensors applications for fruit monitoring. Biosens. Bioelectron. X 2022, 11, 100197. [Google Scholar] [CrossRef]
  20. Xiao, X.; Fu, Y.; Yang, Y.; Zhang, X. Sustainable solar powered battery-free wireless sensing for food cold chain management. Sens. Int. 2022, 3, 100157. [Google Scholar] [CrossRef]
  21. Wang, M.; Yang, Y.; Mu, B.; Nikitina, M.A.; Xiao, X. Millimeter Wave-Based Non-Destructive Biosensor System for Live Fish Monitoring. Biosensors 2022, 12, 541. [Google Scholar] [CrossRef]
  22. Liu, Y.; Jiang, D.; Yun, J.; Sun, Y.; Li, C.; Jiang, G.; Kong, J.; Tao, B.; Fang, Z. Self-Tuning Control of Manipulator Positioning Based on Fuzzy PID and PSO Algorithm. Front. Bioeng. Biotechnol. 2022, 9, 1443. [Google Scholar] [CrossRef] [PubMed]
  23. Yun, J.; Sun, Y.; Li, C.; Jiang, D.; Tao, B.; Li, G.; Liu, Y.; Chen, B.; Tong, X.; Xu, M. Self-adjusting force/bit blending control based on quantitative factor-scale factor fuzzy-PID bit control. Alex. Eng. J. 2021, 61, 4389–4397. [Google Scholar] [CrossRef]
  24. Sain, D.; Praharaj, M.; Bosukonda, M.M. A simple modelling strategy for integer order and fractional order interval type-2 fuzzy PID controllers with their simulation and real-time implementation. Expert Syst. Appl. 2022, 202, 117196. [Google Scholar] [CrossRef]
  25. Ghamari, S.M.; Narm, H.G.; Mollaee, H. Fractional-order fuzzy PID controller design on buck converter with antlion optimi-zation algorithm. IET Control Theory Appl. 2022, 16, 340–352. [Google Scholar] [CrossRef]
  26. Yoon, J.; Doh, J. Optimal PID control for hovering stabilization of quadcopter using long short term memory. Adv. Eng. Inform. 2022, 53, 101679. [Google Scholar] [CrossRef]
  27. Yan, L.; Webber, J.L.; Mehbodniya, A.; Moorthy, B.; Sivamani, S.; Nazir, S.; Shabaz, M. Distributed optimization of heterogeneous UAV cluster PID controller based on machine learning. Comput. Electr. Eng. 2022, 101, 108059. [Google Scholar] [CrossRef]
  28. Borase, R.P.; Maghade, D.K.; Sondkar, S.Y.; Pawar, S.N. A review of PID control, tuning methods and applications. Int. J. Dyn. Control. 2021, 9, 818–827. [Google Scholar] [CrossRef]
  29. Wang, J.; Li, M.; Jiang, W.; Huang, Y.; Lin, R. A Design of FPGA-Based Neural Network PID Controller for Motion Control System. Sensors 2022, 22, 889. [Google Scholar] [CrossRef]
  30. Rodriguez-Abreo, O.; Rodriguez-Resendiz, J.; Fuentes-Silva, C.; Hernandez-Alvarado, R.; Falcon, M.d.C.P.T. Self-Tuning Neural Network PID With Dynamic Response Control. IEEE Access 2021, 9, 65206–65215. [Google Scholar] [CrossRef]
  31. Veerasamy, V.; Wahab, N.I.A.; Ramachandran, R.; Othman, M.L.; Hizam, H.; Kumar, J.S.; Irudayaraj, A.X.R. Design of single- and multi-loop self-adaptive PID controller using heuristic based recurrent neural network for ALFC of hybrid power system. Expert Syst. Appl. 2021, 192, 116402. [Google Scholar] [CrossRef]
  32. Nayak, J.R.; Shaw, B.; Sahu, B.K.; Naidu, K.A. Application of optimized adaptive crow search algorithm based two degree of freedom optimal fuzzy PID controller for AGC system. Eng. Sci. Technol. Int. J. 2022, 32, 101061. [Google Scholar] [CrossRef]
  33. Azaza, M.; Tanougast, C.; Fabrizio, E.; Mami, A. Smart greenhouse fuzzy logic based control system enhanced with wireless data monitoring. ISA Trans. 2016, 61, 297–307. [Google Scholar] [CrossRef] [PubMed]
  34. Krishna, S.; Vasu, S. Fuzzy PID based adaptive control on industrial robot system. Mater. Today Proc. 2018, 5, 13055–13060. [Google Scholar] [CrossRef]
  35. Priyanka, E.B.; Maheswari, C.; Thangavel, S. Online monitoring and control of flow rate in oil pipelines transportation system by using PLC based Fuzzy-PID Controller. Flow Meas. Instrum. 2018, 62, 144–151. [Google Scholar] [CrossRef]
  36. Vinod, J.; Sarkar, B.K.; Sanyal, D. Flow control in a small Francis turbine by system identification and fuzzy adaptation of PID and deadband controllers. Renew. Energy 2022, 201, 87–99. [Google Scholar] [CrossRef]
  37. Liang, H.; Zou, J.; Zuo, K.; Khan, M.J. An improved genetic algorithm optimization fuzzy controller applied to the wellhead back pressure control system. Mech. Syst. Signal Process. 2020, 142, 106708. [Google Scholar] [CrossRef]
  38. Jin, X.; Chen, K.; Zhao, Y.; Ji, J.; Jing, P. Simulation of hydraulic transplanting robot control system based on fuzzy PID controller. Measurement 2020, 164, 108023. [Google Scholar] [CrossRef]
  39. Mok, R.H.; Ahmad, M.A. Fast and optimal tuning of fractional order PID controller for AVR system based on memoriza-ble-smoothed functional algoritm. Eng. Sci. Technol. Int. J. 2022, 35, 101264. [Google Scholar]
  40. Olivas, F.; Valdez, F.; Castillo, O.; Gonzalez, C.I.; Martinez, G.; Melin, P. Ant colony optimization with dynamic parameter adaptation based on interval type-2 fuzzy logic systems. Appl. Soft Comput. 2017, 53, 74–87. [Google Scholar] [CrossRef]
  41. Elsisi, M. Improved grey wolf optimizer based on opposition and quasi learning approaches for optimization: Case study autonomous vehicle including vision system. Artif. Intell. Rev. 2022, 55, 5597–5620. [Google Scholar] [CrossRef]
  42. Izci, D. Design and application of an optimally tuned PID controller for DC motor speed regulation via a novel hybrid Lévy flight distribution and Nelder–Mead algorithm. Trans. Inst. Meas. Control. 2021, 43, 3195–3211. [Google Scholar] [CrossRef]
  43. Lawrence, N.P.; Forbes, M.G.; Loewen, P.D.; McClement, D.G.; Backström, J.U.; Gopaluni, R.B. Deep reinforcement learning with shallow controllers: An experimental ap-plication to PID tuning. Control Eng. Pract. 2022, 121, 105046. [Google Scholar] [CrossRef]
Figure 1. Aquatic product processing and modified atmosphere packaging flow chart.
Figure 1. Aquatic product processing and modified atmosphere packaging flow chart.
Applsci 13 02674 g001
Figure 2. Workflow chart of the gas distribution system.
Figure 2. Workflow chart of the gas distribution system.
Applsci 13 02674 g002
Figure 3. Data transmission and architecture diagram of the gas distribution system.
Figure 3. Data transmission and architecture diagram of the gas distribution system.
Applsci 13 02674 g003
Figure 4. Schematic diagram of the fuzzy PID controller structure.
Figure 4. Schematic diagram of the fuzzy PID controller structure.
Applsci 13 02674 g004
Figure 5. Fuzzy logic toolbox.
Figure 5. Fuzzy logic toolbox.
Applsci 13 02674 g005
Figure 6. E and Ec membership function.
Figure 6. E and Ec membership function.
Applsci 13 02674 g006
Figure 7.Kp, ∆Ki, and ∆Kd membership function.
Figure 7.Kp, ∆Ki, and ∆Kd membership function.
Applsci 13 02674 g007
Figure 8. Fuzzy rule editor.
Figure 8. Fuzzy rule editor.
Applsci 13 02674 g008
Figure 9. Three-dimensional model diagram of ∆Kp, ∆Ki, and ∆Kd as the output results.
Figure 9. Three-dimensional model diagram of ∆Kp, ∆Ki, and ∆Kd as the output results.
Applsci 13 02674 g009
Figure 10. Hardware structure of the gas preservation and gas distribution system.
Figure 10. Hardware structure of the gas preservation and gas distribution system.
Applsci 13 02674 g010
Figure 11. Physical implementation of the gas distribution system. 1. Solenoid valve; 2. CO2 sensor; 3. mass flow controller; 4. relay; 5. PLC; 6. power switch; 7. 4G DTU; 8. power supply socket; and 9. gas mixture.
Figure 11. Physical implementation of the gas distribution system. 1. Solenoid valve; 2. CO2 sensor; 3. mass flow controller; 4. relay; 5. PLC; 6. power switch; 7. 4G DTU; 8. power supply socket; and 9. gas mixture.
Applsci 13 02674 g011
Figure 12. Flow chart of the gas distribution process.
Figure 12. Flow chart of the gas distribution process.
Applsci 13 02674 g012
Figure 13. Actual drawing of the appearance of the gas distribution system.
Figure 13. Actual drawing of the appearance of the gas distribution system.
Applsci 13 02674 g013
Figure 14. Schematic diagram of the sub-interface.
Figure 14. Schematic diagram of the sub-interface.
Applsci 13 02674 g014
Figure 15. First-order pure lag system curve of the gas distribution system.
Figure 15. First-order pure lag system curve of the gas distribution system.
Applsci 13 02674 g015
Figure 16. The simulation experimental platform.
Figure 16. The simulation experimental platform.
Applsci 13 02674 g016
Figure 17. System simulation results.
Figure 17. System simulation results.
Applsci 13 02674 g017
Table 1. Δ K p fuzzy rule table.
Table 1. Δ K p fuzzy rule table.
E NMNSZOPSPMPB
EC
NBPBPMPSZO
NMPSZO
NSPMNMPMPSZONSNM
ZOPSPSZONSNM
PSZONS
PMZONSNMNMNB
PBZONSNB
Table 2. Δ K i fuzzy rule table.
Table 2. Δ K i fuzzy rule table.
ENBNMNSZOPSPMPB
EC
NBNBNBNMZO
NMNMNS
NSNMNSZOPS
ZONSNSZOPSPM
PSZOPMPSPM
PMZOPSPMPB
PBPMPB
Table 3. Δ K d fuzzy rule table.
Table 3. Δ K d fuzzy rule table.
ENBNMNSZOPSPMPB
EC
NBPSZOPB
NMNSPM
NSNBNMNSZOPS
ZONBNMPS
PSNMNSZOPS
PMNMNS
PBPSZOPB
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Zhang, H.; Zuo, X.; Sun, B.; Wei, B.; Fu, J.; Xiao, X. Fuzzy-PID-Based Atmosphere Packaging Gas Distribution System for Fresh Food. Appl. Sci. 2023, 13, 2674. https://doi.org/10.3390/app13042674

AMA Style

Zhang H, Zuo X, Sun B, Wei B, Fu J, Xiao X. Fuzzy-PID-Based Atmosphere Packaging Gas Distribution System for Fresh Food. Applied Sciences. 2023; 13(4):2674. https://doi.org/10.3390/app13042674

Chicago/Turabian Style

Zhang, Haiyu, Xuanyi Zuo, Boyu Sun, Bingqing Wei, Jiajie Fu, and Xinqing Xiao. 2023. "Fuzzy-PID-Based Atmosphere Packaging Gas Distribution System for Fresh Food" Applied Sciences 13, no. 4: 2674. https://doi.org/10.3390/app13042674

APA Style

Zhang, H., Zuo, X., Sun, B., Wei, B., Fu, J., & Xiao, X. (2023). Fuzzy-PID-Based Atmosphere Packaging Gas Distribution System for Fresh Food. Applied Sciences, 13(4), 2674. https://doi.org/10.3390/app13042674

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop