Introduction

The jujube, a fruit with medicinal properties, is abundant in vitamins, dietary fiber, organic acids, and other bioactive compounds. It possesses substantial nutritional value and exhibits immunomodulatory effects. The jujube is native to China, where the jujube tree is widely cultivated. With the development of modern planting technology, the scale and production of jujubes have been increasing. Among them, the jujube is one of China's unique varieties and is commonly grown in Xinjiang. It has high yields, an attractive appearance, a large size, and a rich taste, which are favored by consumers. After harvesting, fresh jujubes are prone to softening, aging, and even rotting, which leads to a decline in their quality and affects their sale and the enthusiasm of growers. To improve the economic benefits of farmers’ cultivation and ensure the maximization of income, it is imperative to extend the storage quality and shelf life of jujubes.

Generally speaking, the storage and preservation of jujubes are achieved by reducing their respiration and inhibiting the growth of bacteria, among other methods. There are many commonly used storage and preservation methods, such as chemical preservation, mechanical refrigeration, irradiation preservation, and air-conditioned storage. Among these, air-conditioned storage is more widely used due to its environmental and health benefits1,2,3,4,5,6. Gas-conditioned storage aims to alter the storage process of fruits and vegetables by adjusting factors such as gas composition, temperature, and humidity to extend their shelf life. To enhance the effectiveness of jujube gas-conditioned storage, accurate monitoring of environmental parameters is essential. In 2021, Fang et al.7 reviewed and analyzed the progress of gas-conditioning and freshness-preservation technology in fruit and vegetable storage. They also demonstrated that numerous factors affect fruit and vegetable storage and emphasized the need to choose the appropriate storage method. The combination of emerging technologies with gas-conditioning freshness preservation is beneficial for fruit and vegetable storage. In 2011, Junxiang et al.8 constructed a fruit cold storage environment monitoring system based on a wireless sensor network that sends the collected data to the database server in the control center, enabling remote, real-time monitoring and control of the fruit cold storage environment. In 2020, Torres-Sánchez, et al.9 developed a real-time shelf-life monitoring system for fruits and vegetables. This system is capable of monitoring environmental factors that affect the quality of fruit and vegetable products, such as temperature, humidity, and gas concentration. Monitoring and controlling these parameters during storage and transportation contribute to optimizing product quality and reducing losses.

Concurrently, the advancement of Internet of Things (IoT) technology in recent times has led to its extensive application across diverse sectors, including food conservation, aquaculture, cold chain logistics, and the industrial sector. In modern wireless communication technology, in 2010, Atzori et al.10 discussed and analyzed that IoT can be regarded as one of the most revolutionary technologies, while in 2016, Nukala et al.11 pointed out that IoT platforms can provide monitoring data and useful solutions for farmers to solve practical problems. In 2022, Khan et al.12 analyzed and discussed the application of IoT security and blockchain technology in the industrial sector. Control systems designed based on IoT have huge advantages over most traditional systems. In 2019, Geng et al.13 designed a mobile greenhouse environment control system based on the Internet of Things (IoT) to enable multi-point monitoring of the greenhouse environment and address issues with current monitoring methods. In 2023, Chong et al.14 developed an environmental monitoring and control system for IoT-based home mushroom cultivation, which enables the remote control of growing conditions such as temperature, humidity, and light levels through mobile and web applications. In 2022, Lamberty et al.15 proposed analyzing an environmental parameter monitoring system for the fresh fruit and vegetable supply chain based on IoT sensors and communication technologies. This system enables the monitoring of environmental parameters such as temperature, relative humidity, oxygen, and carbon dioxide to improve the quality of produce. Nonetheless, even with the swift advancement of IoT technologies and diverse control solutions, substantial hurdles remain in the deployment of monitoring systems for IoT.

Based on the above literature analysis and the control requirements for jujube storage and preservation, although the current fruit and vegetable storage and preservation systems can meet the control requirements to some extent, different products with varying quality characteristics and freshness require different storage environment parameters. Additionally, some systems have higher unification costs, insufficient stability, complex internal structures, higher operator requirements, and low monitoring visibility. To meet the control requirements for the jujube storage environment, the system should be designed using the principles and characteristics of Internet of Things (IoT) technology. This includes building the functional structure of the system, integrating the necessary software and hardware equipment, using wireless network communication technology to enable communication between various levels of equipment, and utilizing a cloud platform for data storage and remote system control16,17,18,19,20. The demand analysis of the jujube storage and preservation system was initially conducted in this study, followed by the comprehensive design of its overall structure, control strategy, and monitoring screen. Subsequently, a functional test and analysis were performed to demonstrate that the system enables real-time remote monitoring of the storage and preservation environment for jujubes while meeting the control requirements. This contributes to extending their freshness period while offering excellent human–computer interaction functionality and highly visualized screens.

Methods

Design of the overall system framework

Analysis of demand

Addressing the issue of storing and maintaining jujubes requires an examination of the preservation method, the operational setting, and the operational needs of the system. The system requires that the jujube storage and preservation control system can collect the temperature of the jujube storage space in real time, humidity, gas (carbon dioxide and oxygen) volume fraction and other environmental parameters, through the program will be detected with the pre-set storage environment parameter value comparison and analysis, and then real-time adjustment and control of jujube storage and preservation of the environment parameter value, in order to achieve the comprehensive goal of intelligent control. The system can perform monitoring, control, and real-time display functions for jujube storage. It features a user-friendly interface and supports remote monitoring via the touch screen and cell phone. The information collected by the system through the cloud server is recorded and stored in Excel format, including data reporting, management, and more21,22,23.

IoT framework architecture design

The control system is mainly composed of three layers, namely field layer, transmission layer and application layer, as shown in Fig. 1. PLC is the core of the control system, mainly responsible for processing the acquisition of analog information such as temperature sensors, humidity sensors, oxygen sensors, carbon dioxide sensors, etc., and comparing the results of the arithmetic processing and the system storage and preservation of the set value, so as to make a decision to determine the work of the actuator. State. The touch screen, as the human–machine interface of the system, can not only monitor the environmental parameters of storage and preservation in real time but also the working status of each device in the system. In addition, in order to realize the management personnel in the cell phone on the jujube storage and preservation process monitoring, the use of cloud box to establish communication with the PLC, through the 4G network for the collection of data information in the cloud, transmission, etc.

Fig. 1
figure 1

IoT architecture of the system.

The remote monitoring of the system is centered on the PLC controller, which can be accessed through the HMI module's touchscreen or a mobile phone. The reason this system chooses a PLC is that it has strong anti-interference ability, reliable performance, a compact size, good scalability characteristics, and other advantages. Based on the system's control function requirements, the SIMATIC S7-200 SMART CPU ST30 PLC is selected as the control core to manage each module. Its control structure diagram is shown in Fig. 2.

Fig. 2
figure 2

System control structure diagram.

The main controller of the system mainly consists of host CPU module, analog module, touch screen, IoT cloud box, etc., and the schematic diagram of its hardware selection is shown in Fig. 3. Meanwhile the hardware configuration table of the main controller of the control system is shown in Table 1.

Fig. 3
figure 3

Hardware selection physical diagram.

Table 1 Primary hardware configuration table.

The hardware configuration of the control system also includes actuating devices such as inlet solenoid valves, exhaust solenoid valves, frequency converters, centrifugal fans, refrigeration units, and feedback devices like temperature sensors, humidity sensors, carbon dioxide sensors, and oxygen sensors. The hardware configuration parameters for the system sensors are shown in Table 2.

Table 2 Hardware configuration parameters of the sensor.

Control strategies and processes

Combined with the function and control process of jujube storage and preservation, the program design of the system should not only consider the functional requirements, but also consider the operational requirements. In order to achieve to realize the control objectives of the system and the convenience of operation, two control terminals are designed for the system, which are touch screen and cell phone applet. The management personnel will send the set storage parameters to the PLC controller through the touch screen or cell phone applet, or the data can be uploaded to the cloud server, and then sent down to the PLC controller through the 4G DTU. The system uses ladder language to write its programs, which can control the storage and preservation environment through PID control24,25,26,27,28,29,30,31, and the PID control flow chart is shown in Fig. 4.

Fig. 4
figure 4

PID control flow chart.

In the domain of analog control, sophisticated programmable logic controllers (PLCs) are increasingly employed in fuzzy and nonlinear control systems. Serving as the central component, the controller ensures that the controlled variable is fed back to the input for comparison with the desired value. Subsequently, the deviation e (t) is relayed to the controller, which then produces a signal u (t) adhering to different control principles, resulting in a consistent value for the controlled variable. The connection between these two is depicted in the following manner:

$$\mu ({\text{t}}) = {\text{f}}\left[ {\text{e(t)}} \right]$$
(1)

There are four unique principles for analogue control: P, PI, PD, and PID. The PID includes various elements of proportional, integral, and differential control laws, offering the capability to alter control parameters. Proportional control usually takes precedence, while integral control assists in harmonizing differential control. The presentation of PID control is detailed in the following manner:

$$\Delta U = P\left( {E + \frac{1}{t}\int\limits_{0}^{t} {{\text{edt}} + D\frac{de}{{dt}}} } \right)$$
(2)

where P represents the controller’s proportional gain, e signifies the deviation, and ∆U indicates the control's output variation level.

According to the manual analysis, the control system is optimized using the PID control function with an incomplete differential and a first-order inertial digital filter. The calculation formulas are as follows (36).

$${\text{e}}\left( {\text{k}} \right) = S{\text{V}} - {\text{PV}}_{{\text{f}}} ({\text{k}})$$
(3)

In this context, e (k) signifies the present deviation in sampling, SV denotes the predetermined value, and PVf(k) indicates the value recorded at the sampling moment.

$$\Delta U(K) = K\left[ {{\text{e}}\left( {\text{k}} \right) - {\text{e}}\left( {{\text{k}} - {1}} \right) + \frac{{\text{T}}}{{{\text{Ti}}}}e\left( k \right) + D(K)} \right]$$
(4)

e (k−1) in the formula represents a deviation before a cycle, T represents the adoption of a cycle, Ti represents integral time, and D (k) represents this differential.

$$D(K) = \frac{Td}{{T + a_{d} Td}}\left[ {{2}PV_{f} (k - 1) + PV_{f} (k) + PV_{f} (k - 2) + \frac{{a_{d} Td}}{{T + a_{d} Td}}D(k - 1)} \right]$$
(5)

In this context, Td represents the differential time, and symbolizes the differential gain, PVf(k−1) indicates the value measured post-filtering a cycle earlier, and PVf(k−2) indicates the value measured two cycles prior.

$${\text{U(k)}} = \sum \Delta {\text{U}}$$
(6)

Here, u (k) represents the present output value, and DU signifies the degree of change in output.

The system is categorized into two control modes: manual and automatic. In the manual control mode, the operator can utilize either the touch screen or the cell phone's button switch to regulate the associated equipment.When the mode is set to automatic control, the system collects environmental parameters such as temperature, humidity, and gas concentration from the jujube storage through sensors. These variables are transmitted to the PLC. After performing control operations by the system, the results are compared with the predefined environmental parameters. Based on this comparison, the operation of actuators is controlled until meeting new storage requirements32,33,34,35. The control flowchart is illustrated in Fig. 5.

Fig. 5
figure 5

System control flowchart.

Design of the interface for remote surveillance

Configuration of communication parameters

In order to realize the remote control of the system, it is necessary to establish communication among PLC, touch screen and IoT cloud box. Among them, the data exchange between the PLC, touch screen, and IoT cloud box uses industrial Ethernet. Therefore, it is necessary to set the IP addresses to the same network segment in their device communication editing windows to establish normal communication. In the touch screen software device management and the cloud platform device management, select the PLC type as Siemens S7-200 Smart and then verify the communication connection. After confirming that there are no errors, you can enter the user window to design the relevant configuration screen36,37,38,39,40. The IP address configuration of the devices in this system solution is shown in Table 3.

Table 3 IP address assignment table for devices.

Configuration interface design

The design of the cell phone interface is achieved through the configuration design function on the cloud platform, which provides users with configuration editing capabilities. This allows for monitoring and control of the storage environment and each actuator through the configuration editor, facilitating a more intuitive display. The operation screen requires the manager to input the parameter setting value via the cell phone interface. The cloud server will then send and parse the data through a 4G DTU, writing the setting value into the corresponding PLC register. Simultaneously, the information collected by the sensors will be parsed and uploaded to the cloud server via the 4G DTU and displayed on the cell phone interface15,41,42.

The design of the mobile interface is accomplished through the following steps:

Establishing a connection with the cloud platform is imperative for achieving remote control of the mobile terminal, which necessitates communication between the PLC, IoT cloud box, and the cloud platform.

Interface configuration design. According to the function of the control system, the interface design for the cell phone applet and PC mainly includes the main interface, control interface, and monitoring screen.

The association of system variables. Each switch, button, indicator, data display box, parameter setting input box, etc. The interface of the handheld device is associated with the data for the corresponding variables.

The design process for the touchscreen configuration is analogous to that of the cellphone interface, and its functionalities are essentially identical. Managers have the capability to remotely modify storage environment parameters, monitor real-time parameter values and historical data, and receive system alarms. Figures 6 and 7 depict the components of the cellphone app screen.

Fig. 6
figure 6

Home screen of the mobile applet.

Fig. 7
figure 7

Monitoring screen of mobile applet.

Testing and analysis

Communication transmission reliability test

To ensure the reliable and stable operation of the system, it is imperative to verify the communication stability and functional integrity of its equipment, as well as conduct comprehensive testing and analysis of the system's communication performance. The primary objective of the communication test is to ascertain whether normal connections are established among various devices within the system, whether real-time data uploading from the PLC controller hosting area to the cloud server is feasible, and whether data transmission and communication functions operate seamlessly during system operation43.

Modbus RTU program design embedded inside the PLC to complete the communication between the sensor and the PLC, so that it can transmit data with the cloud server.Need to meet through the cell phone small program to realize the remote control function of the mobile client; can be set through the parameter setting button, set the steer jujube storage and preservation of the parameters required by the environment; can real-time monitoring of the working status of the instrument and equipment, etc. Figs. 8 and 9, respectively, show the main screen when running on the touch screen and cell phone. On the main screen, the data detected by each sensor and the operation status of each device can be displayed in real-time, indicating that the communication connection between each device is normal and stable during the test.

Fig. 8
figure 8

Touch screen monitor main screen.

Fig. 9
figure 9

Mobile monitoring main screen.

Accuracy and stability test

For testing purposes, Xinjiang jujube was chosen, and a fresh batch of 300 kg was acquired from the Tarim University Fruit Farmers' Market. It was mandatory for the jujube to maintain a consistent size, yield complete fruits, undergo no ripening process, reach a ripeness level of 8, and avoid any mechanical harm on its surface. The examination utilized a jujube acquired from the Tarim University Fruit Farmers' Market. Prior to conducting the experiment, the jujube underwent pre-cooling in cold storage until it attained an average temperature of 2 °C. Subsequently, the items were stored in plastic fruit baskets and stored in a test box to verify the functional stability of Xinjiang jujube's storage and freshness-preserving environment.

After the system hardware installation and wiring are completed, the system software parameters should be configured. At the same time, based on the system's control functions and according to the relevant literature44,45,46,47, combined with the jujube storage and preservation of environmental parameters, select the mode of automatic operation of the system.Set the upper limit value of the temperature of the control system to 5 °C and the lower limit value to 2 °C; set the upper limit value of the humidity to 90% and the lower limit value to 85%; set the upper limit value of the volume fraction of oxygen to 6% and the lower limit value to 3%; and set the limit value of the volume fraction of carbon dioxide to 5%.The set value will be uploaded to the PLC controller through the human–computer interface or cell phone applet to carry out the parameter regulation experiment to verify the stability of the system control function, and the storage environment parameter regulation curve of the system is shown in Figs. 10 and 11.

Fig. 10
figure 10

Temperature and humidity control curve.

Fig. 11
figure 11

Gas concentration control curve.

Comparative analysis of the data in the graphs above shows that the temperature, humidity, oxygen volume fraction, and carbon dioxide volume fraction of the storage environment were largely controlled within the set values during the 4-day experimental period. After PID regulation, the storage environment's temperature and humidity not only met control requirements but also achieved higher precision, faster response, and a more stable gas conditioning process. Additionally, the system features a user-friendly man–machine interface with high visualization, simple and convenient operation, and supports touchscreen and mobile phone functions, which are beneficial for the storage and preservation of jujube.

It can be seen that, in the design process of the system, besides the perception layer, the technical difficulties in the Internet of Things context for the jujube storage and preservation control system architecture lie in designing the communication module, detection module, control module, and control strategy. Therefore, we must align the control function and process of the system with the requirements of the jujube storage environment during the design process.Through the characterization of the system and functional test trials, the control module, communication module, and control model parameters are adjusted to meet the requirements for intelligent detection, accurate data transmission, effective monitoring, and convenient operation and control. In the course of its design and development, we have gained the following meaningful insights and experiences:

To achieve real-time control of the storage environment, sensors are used to sample parameters such as temperature, humidity, oxygen concentration, and carbon dioxide concentration. The collected data is then transmitted to the controller through the conversion module. By processing the data within its internal program, the controller generates output signals to control the operation of each executive element. Hence, ensuring high precision and implementing rational control strategies for electrical components are crucial.

The key to the remote control is establishing a data transmission channel between the sensor, the controller, and the cloud platform. Therefore, it is necessary to choose a good communication module to complete the protocol conversion between the devices.

Attaining dynamic oversight of storage and preservation necessitates the implementation of effective human–computer interaction capabilities. Simultaneously, it enables tasks such as equipment monitoring, data supervision, alarm monitoring, report management, and more to be executed using a mobile phone without geographical limitations. Consequently, achieving efficient communication in configuration and interface design is crucial.

Conclusions

Overall, the jujube storage and preservation system, based on the Internet of Things architecture and combined with specific environmental and functional requirements, involves constantly adjusting the control module and parameters through system analysis. This ensures intelligent perception of the jujube storage environment, data storage and transmission, remote monitoring, and other needs, and achieves closed-loop control of the monitoring process. At the same time, by using the Internet of Things cloud box to establish the cloud platform, controller, and touch screen data transmission and exchange channels, the system enables remote control via cell phone, PC, and touch screen, thereby meeting its control objectives and functional requirements.Through the system's test analysis, it shows that the system is stable, reliable, precise, easy to operate, and has good human–computer interaction functions. It can meet the environmental control requirements for jujube storage and preservation, which is conducive to preserving jujubes. It enables remote monitoring via cell phone and touch screen terminals, greatly improving working conditions and management efficiency.

Although the system fulfills the control requirements, there are still certain deficiencies that necessitate improvement. Further optimization is required for enhancing the control functionality of the system. This will enable a more intelligent process for jujube storage and preservation, encompassing cleaning, sorting, and storage operations, thereby fostering the advancement of intelligent storage solutions for fruits and vegetables in Xinjiang.