Greenhouse Fuzzy Control System Based on Industrial PC
2026-04-06 05:50:53··#1
my country is gradually improving the level of automation in agriculture, especially in greenhouse vegetable cultivation, which is now widely adopted and valued across the country. However, most existing greenhouses rely on manual control, making it difficult to effectively monitor and adjust the greenhouses in real time to keep pace with the vegetable growth process. To enhance my country's greenhouse technology, Shanghai and Beijing have imported some modern greenhouse equipment and control systems from the Netherlands. However, these devices and systems are expensive and have high operating costs, hindering their widespread adoption in China. Furthermore, an automated control system is needed for agricultural experts to study crop growth and development. This article will introduce a greenhouse fuzzy control system based on an industrial computer. 1. Functional Overview The greenhouse fuzzy control system has the following functions: ① Real-time control of parameters such as greenhouse air temperature, air humidity, surface temperature, soil moisture, light intensity, soil nutrient solution concentration, and CO2 concentration, based on the growth requirements of crops; ② Display of internal and external environmental parameters in the form of data and charts, and query historical records; ③ Display of the open and closed status of actuators; ④ Manual control of actuators by operators; ⑤ An open platform for real-time querying and modification of greenhouse control parameters to find the optimal control strategy; [b]2. Hardware Composition[/b] The system consists of sensors and transmitters, actuators, A/D data acquisition cards, I/O cards, relay output cards, and an industrial computer, as shown in Figure 1. Sensors and transmitters include air temperature and humidity sensors, surface temperature and humidity sensors, and matching transmitters. These are used to convert non-electrical signals into electrical signals. They are also converted into current loop signals for long-distance transmission. Actuators include fans, air pumps, water curtains, shading curtains, solenoid valves, and side windows, used to adjust greenhouse parameters. The A/D acquisition card uses the YLY7202 interface board, containing 32 channels and a 12-bit A/D converter. It converts the current loop signal into a voltage signal, and then into a digital quantity. The I/O card uses the YLY701 interface board, containing 32 optically isolated inputs and 32 optically isolated outputs. It is used to drive the actuators and provide feedback on their status. The relay card uses solid-state relays. The input terminal connects to the DC signal output from the I/O card, and the output terminal connects to the AC 220V signal from the intermediate relay coil. The intermediate relay connects the contactor to drive each actuator. The industrial computer uses an Advantech industrial computer host, which mainly performs functions such as controlling the A/D acquisition card, determining the output based on input parameters, controlling the I/O card, monitoring the action status of the actuators, and displaying charts in real time. 3 Control Mode Greenhouse control involves multiple parameters such as temperature, humidity, illuminance, and concentration, as well as various adjustment mechanisms such as fans, side windows, air pumps, water curtains, and lighting. Furthermore, there are no accurate transfer functions for the various parameters in the greenhouse. Therefore, greenhouse control is a complex multi-input, multi-output control system. Here, pre-processed fuzzy control is used to achieve real-time adjustment of various parameters. The pre-processing process is explained in three aspects below. (1) Different seasons require different adjustment measures. In spring and autumn, parameters such as temperature and humidity can be adjusted by side windows, fans, water curtains, and shade curtains. In winter, temperature and humidity parameters can be adjusted by heating and water curtains, but not by fans and side windows. Therefore, the control is divided into two modes: winter and other seasons. Winter adjustment measures include: heating solenoid valves, air pumps, water pumps, water curtains, and supplementary lighting; other season adjustment measures include: side windows, fans, shade curtains, water curtains, air pumps, water pumps, and supplementary lighting. (2) Different growth stages require different parameters and different control modes. Taking tomatoes as an example, the entire growth process is divided into: germination stage, seedling stage, flowering stage, and fruiting stage. The parameter requirements for tomatoes at different stages are shown in Table 1. Therefore, the control is further divided into four growth stages and three time periods: daytime, first half of the night, and second half of the night. Different membership functions and adjustment measures are used at different stages. (3) Relationship between different parameters and adjustment measures. When CO2 is supplemented and temperature and humidity changes are not significant, side windows and fans cannot be opened. When there is insufficient light, the shade curtain cannot be drawn. Therefore, the control mode adopts a shielding method. When CO2 is supplemented, the side windows and fans are shielded; when there is insufficient light, the shade curtain is shielded; when the outdoor temperature is high, the side windows are shielded. After the above processing, there are 16 control modes for winter germination and other season germination, and three shielding methods: fan shielding, side window shielding, and shade curtain shielding. 4 Control Algorithm The greenhouse controller adopts fuzzy control. The control algorithm is introduced with the germination period of other seasons as an example: Taking temperature as an example, the suitable temperature for tomato germination is 25-30℃, the minimum temperature is 11℃, and the maximum temperature is 35℃. The temperature and temperature difference adopt trapezoidal and triangular membership functions, as shown in Figure 2 and Figure 3. According to the membership function, the fuzzy sets of temperature and temperature difference are divided into five types: negative, relatively negative, zero, relatively positive, and positive. Based on expert analysis and experiments, the following 25 control rules were established: If T is negative and ΔT is negative, the fan is turned off and the side window is closed; if T is positive and ΔT is positive, the fan is turned on and the side window is opened; if T is zero and ΔT is positive, the fan is turned off and the side window is opened; ... During actual adjustment, temperature and temperature difference signals were collected in real time, and the membership degrees of temperature and temperature difference for different fuzzy sets were calculated. Then, according to the 25 control rules, the membership degrees of fan off, fan on, side window closed, and side window open were calculated respectively, and the one with the higher membership degree was executed. Other parameter adjustment algorithms are as follows: humidity adjustment is the same as temperature adjustment, with a water curtain added to the actuator; illuminance adjustment uses shading curtains; if the outdoor temperature or humidity is higher than the indoor temperature, the side window is shielded; other parameter adjustment methods are similar. 5. Conclusion The greenhouse intelligent control system based on fuzzy control can control multiple parameters in real time. After nearly a year of trial operation, the control accuracy can meet the requirements of crop growth. At the same time, the excellent human-machine interface has also promoted agricultural experts' research on the crop growth process.