Control method and device for tomato planting light supplementing lamp

By combining improved YOLOv12 image recognition with fuzzy PID algorithm, dynamic light parameter control of tomato supplemental lighting equipment was achieved, solving the shortcomings of existing equipment in recognition accuracy and light stability, meeting the light requirements of tomatoes throughout their entire growth cycle, and improving growth performance.

CN121665401APending Publication Date: 2026-03-13FUYANG NORMAL UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202512017006.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-30
Publication Date
2026-03-13

AI Technical Summary

Technical Problem

Existing tomato supplemental lighting equipment lacks dynamic adaptability and cannot adjust light parameters according to the needs of different growth stages of tomatoes. It also suffers from insufficient recognition accuracy and unstable light intensity adjustment, resulting in a mismatch between the supplemental lighting effect and the plant's growth needs.

Method used

An improved YOLOv12 image recognition algorithm combined with a fuzzy PID algorithm is used to identify the growth stage of tomatoes through image acquisition equipment. The red and blue light ratio and light intensity are automatically set according to the light parameter library for different stages. The adaptive control of light is achieved by using a 12-channel PWM dimming circuit, combined with closed-loop control to stabilize the light environment.

Benefits of technology

It achieves precise matching of light parameters throughout the entire growth period of tomatoes, improves the accuracy of small target recognition, ensures the stability of light intensity, provides a suitable growth environment, and promotes tomato growth.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121665401A_ABST
    Figure CN121665401A_ABST
Patent Text Reader

Abstract

The invention discloses a control method and device for a tomato planting light supplement lamp, and the method comprises the following steps: collecting a tomato plant image through an image collection device, and processing the image through an improved YOLOv12 image recognition algorithm, so as to judge the current growth period of a tomato; after the main control chip receives the growth period judgment result, a preset staged illumination parameter library is called, and a corresponding red-blue light ratio is automatically set; the illumination sensor collects environment illumination intensity data in real time and feeds the environment illumination intensity data back to the main control chip, the main control chip adopts a fuzzy PID algorithm, the brightness of six red light bands and six blue light bands is controlled by adjusting the duty ratio of 12 PWM signals, and the illumination intensity is stabilized within the standard range corresponding to the current growth period. The tomato growth period is accurately judged by improving the YOLOv12 image recognition algorithm, the adaptive regulation and control of the red-blue light ratio and the illumination intensity are realized by combining the fuzzy PID algorithm and the 12-path PWM dimming circuit, and the method is suitable for the greenhouse tomato large-scale planting scene.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent agricultural light control technology, specifically a control method and device for supplemental lighting in tomato cultivation. Through the synergy of image recognition, closed-loop control, and customized hardware, it achieves precise adaptation of light parameters throughout the entire growth period of tomatoes. Background Technology

[0002] Tomatoes are one of the core crops in greenhouse cultivation. Artificial lighting is a crucial technology for compensating for insufficient natural light and ensuring normal plant growth and development. It directly affects the photosynthetic efficiency of tomato leaves, fruit yield, and quality. The requirements for red-blue light ratios and light intensity vary significantly throughout the tomato's growth cycle (seedling stage, flowering and fruit setting stage, fruit enlargement stage, and maturity stage). Existing tomato supplemental lighting equipment has several shortcomings: Firstly, it lacks dynamic adaptability to light parameters. Most devices can only output fixed red-blue light ratios and light intensities, failing to make targeted adjustments based on the differentiated physiological needs of the tomato seedling, flowering and fruit setting, fruit enlargement, and maturity stages, resulting in a mismatch between the supplemental lighting effect and the plant's growth requirements. Secondly, the accuracy of growth stage identification is insufficient. Traditional identification methods either rely on manual judgment or use general image recognition algorithms, which have weak ability to capture the features of small targets such as tomato flowers and young fruits, easily leading to identification errors. Thirdly, the stability of light intensity regulation is poor, lacking effective closed-loop control. Light intensity is easily affected by environmental disturbances, making it difficult to maintain a suitable growth light environment. Summary of the Invention

[0003] The purpose of this invention is to overcome or at least partially solve the above-mentioned problems by providing a control method and apparatus for supplemental lighting in tomato cultivation.

[0004] To achieve the above objectives, the present invention adopts the following technical solution: a control method for supplemental lighting in tomato cultivation, comprising the following steps: S1. Growth Stage Identification: Image acquisition equipment collects tomato plant images every five days. An improved YOLOv12 image recognition algorithm is used to process the images to determine the current growth stage of the tomato (seedling stage, flowering and fruit setting stage, fruit enlargement stage, and ripening stage). The improved YOLOv12 image recognition algorithm includes: adjusting the input image resolution according to the tomato's growth status (640×640 for seedlings, 1280×1280 for mature plants); replacing the original C3k2 module with a C2f-DCN module; embedding a bidirectional feature pyramid structure in the Backbone network; using the K-means++ algorithm to generate customized anchor boxes; using the EIoU loss function to optimize the bounding box regression error; and adding a class balance loss to address the problem of uneven sample distribution at different growth stages. S2. Light ratio matching: After receiving the growth period determination result, the main control chip calls the preset staged light parameter library and automatically sets the corresponding red and blue light ratio. In the staged light parameter library, the red and blue light ratio is 3-4:1 during the seedling stage, 5-7:1 during the flowering and fruit setting stage, 6-8:1 during the fruit enlargement stage, and 4-5:1 during the ripening stage. S3. Light intensity control: The light sensor collects ambient light intensity data in real time and feeds it back to the main control chip. The main control chip uses a fuzzy PID algorithm to control the brightness of 6 red light bands and 6 blue light bands by adjusting the duty cycle of 12 PWM signals, stabilizing the light intensity within the standard range corresponding to the current growth stage: 2550-3825 LUX during seedling stage, 3825-5100 LUX during flowering and fruit setting stage, 5100-7650 LUX during fruit enlargement stage, and 3825-5100 LUX during maturity stage; and the daily light duration is 12-14 hours during the seedling, flowering and fruit setting, and fruit enlargement stages, and 10-12 hours during maturity stage.

[0005] A control device for supplemental lighting in tomato cultivation includes: The main control module, based on the STC8G2K64S4 chip, includes a reset module, a download interface, and a 485 communication circuit. It features a two-stage voltage conversion power supply module for 3.3V to 5V and 24V to 5V conversion. This power supply module includes C25 and C13 capacitors for filtering and voltage regulation. The main control module extends to provide 12 PWM signal outputs. The reset module of the main control module restarts the chip via a 10K resistor R1 and a reset button. An image acquisition module, connected to the main control module, is used to acquire images of tomato plants and transmit them to the main control module; The light sensing module is connected to the main control module and is used to collect and feed back ambient light intensity data; A 12-channel PWM dimming module is connected to the 12-channel PWM signal output terminals of the main control module. Each channel is based on a PT4115 chip, equipped with a 1K resistor, a 47uH inductor, and a 100uF capacitor. It also has three WJ15EDGVC-3.81-8P series terminal blocks and one WJ15EDGVC-3.81-4P series terminal block. The three WJ15EDGVC-3.81-8P series terminal blocks are used to connect the positive and negative terminals of LED1-LED12 light strips. The WJ15EDGVC-3.81-4P series terminal block is used to connect the 24V power interface, the GND interface, and the 485A / 485B communication interface. The execution module includes 6 red light strips and 6 blue light strips, which are respectively connected to the corresponding branches of the 12-channel PWM dimming module.

[0006] Compared with existing technologies, this invention provides a control method and device for supplemental lighting in tomato cultivation. By improving the YOLOv12 image recognition algorithm, it specifically addresses the problem of low accuracy in recognizing small targets in tomatoes, enabling precise determination of the tomato's seedling, flowering and fruit-setting, fruit enlargement, and ripening stages. This lays a solid foundation for dynamic adaptation of light parameters and avoids improper supplemental lighting due to misjudgment of growth stages. Combining a fuzzy PID algorithm with a 12-channel PWM dimming circuit, it achieves adaptive control of the red-blue light ratio and light intensity, automatically switching light parameters according to the physiological needs of different growth stages without manual intervention, adapting to the differentiated light requirements of tomatoes throughout their entire growth cycle. Simultaneously, the 12-channel PWM dimming circuit, combined with fuzzy PID closed-loop control, effectively improves the stability of light intensity adjustment, reduces light fluctuations caused by environmental interference, provides a constant and suitable light environment for tomato growth, and promotes efficient photosynthesis in the plants. Attached Figure Description

[0007] Figure 1 This is a circuit system diagram of the present invention; Figure 2 This is the circuit diagram of the main control module of the present invention; Figure 3 This is the circuit diagram of the 12-channel PWM dimming module of the present invention; Figure 4 This is a circuit diagram of the terminal block assembly of the present invention; Figure 5 This is a circuit diagram of the reset module of the present invention; Figure 6 This is the circuit diagram of the download interface for this invention; Figure 7 This is a 485 communication circuit diagram of the present invention; Figure 8 This is the circuit diagram of the 3.3V to 5V power supply module of the present invention; Figure 9 This is the circuit diagram of the 24V to 5V power supply module of the present invention; Figure 10 This is a flowchart illustrating the multi-component signal interaction between the image acquisition device, computer device, and main control module of the present invention. Figure 11 This is a flowchart of the process of the present invention. Detailed Implementation

[0008] The present invention will be further described in detail below with reference to the accompanying drawings.

[0009] This specific embodiment is merely an explanation of the present invention and is not intended to limit the invention. After reading this description, those skilled in the art can make creative modifications to this embodiment as needed, but as long as they are within the scope of the claims of the present invention, they are protected by patent law.

[0010] This invention provides a control method and device for supplemental lighting in tomato cultivation, which solves the technical problems in the prior art. The overall concept is as follows: Example

[0011] Please see Figures 1-9 A method for controlling supplemental lighting in tomato cultivation includes the following steps: S1. Growth stage identification: The image acquisition device collects images of tomato plants every five days. The computer equipment identifies and classifies the collected images, and the improved YOLOv12 image recognition algorithm is used to process the images to determine the current growth stage of the tomato (seedling stage, flowering and fruit setting stage, fruit enlargement stage, and ripening stage). S2. Illumination ratio matching: After receiving the growth period determination result, the main control chip calls the preset stage illumination parameter library and automatically sets the corresponding red and blue light ratio. S3. Light intensity control: The light sensor collects ambient light intensity data in real time and feeds it back to the main control chip. The main control chip uses a fuzzy PID algorithm to control the brightness of 6 red light bands and 6 blue light bands by adjusting the duty cycle of 12 PWM signals, so as to stabilize the light intensity within the standard range corresponding to the current growth period.

[0012] To adapt to the growth characteristics of tomatoes throughout their entire growth cycle, precise light parameter standards have been formulated for different stages, as follows: Seedling stage: covering the period from sowing to transplanting, with a red-blue light ratio of 3-4:1, light intensity controlled at 2550-3825 LUX, and daily light duration maintained at 12-14 hours. These parameters can promote seedling root development and leaf expansion, and enhance seedling resistance.

[0013] Flowering and fruit setting period: From planting to the first fruit set, use a red-blue light ratio of 5-7:1, increase the light intensity to 3825-5100 lux, and provide 12-14 hours of light per day to promote flower bud differentiation, increase fruit setting rate, and reduce flower and fruit drop.

[0014] Fruit enlargement period: From fruit set to before fruit color change, set the red-blue light ratio to 6-8:1 and further increase the light intensity to 5100-7650 lux, with 12-14 hours of light per day, which can accelerate fruit cell division and nutrient accumulation, and promote rapid fruit enlargement.

[0015] Fruit ripening period: From fruit color change to harvest completion, adjust the red-blue light ratio to 4-5:1, reduce the light intensity to 3825-5100 lux, and shorten the daily light duration to 10-12 hours. This helps the fruit accumulate sugar, improve color uniformity and taste quality.

[0016] Furthermore, to accurately identify different growth stages of tomatoes, the YOLOv12 algorithm was optimized in multiple dimensions to address issues such as feature loss and insufficient accuracy in the identification of small targets like tomato flowers and young fruits, which are present in traditional algorithms. The specific optimization scheme is as follows: Input layer optimization: Multi-scale dynamic resolution adaptation automatically adjusts the input image resolution according to the growth status of tomato plants. The seedling stage uses 640×640 resolution to avoid compression of small plant features; the mature stage switches to 1280×1280 resolution to fully preserve the detailed features of flowers, fruits and other features, and achieve efficient recognition of plants at different growth stages.

[0017] Backbone network improvements: Enhanced small target feature extraction by replacing the original C3k2 module in YOLOv12 with the C2f-DCN module. This module has adaptive deformation capabilities and can accurately capture the contours and morphological features of irregular small targets such as tomato flowers and young fruits, thereby improving the accuracy of small target recognition.

[0018] Cross-layer feature enhancement: Bidirectional feature pyramid fusion. A bidirectional feature pyramid structure is embedded in the Backbone network. On the one hand, the semantic features of the deep network are passed down, and on the other hand, the texture features of the shallow network are fused up. This effectively solves the problems of blurred features and low recognition of small objects and improves feature expression ability.

[0019] Detection head optimization: Dynamic anchor boxes and loss function upgrades; Dynamic anchor box generation: To address the scale differences at different growth stages of tomatoes, the K-means++ algorithm is used to re-cluster anchor boxes on a dedicated training set, generating customized anchor boxes that are suitable for different targets such as tomato seedlings, flowers, and fruits, replacing the general default anchor boxes and improving target matching accuracy.

[0020] Loss function improvement: The EIoU loss function is adopted to replace the traditional CIoU loss function, which accurately optimizes the bounding box regression error; at the same time, the class balance loss is added to solve the problem of uneven sample distribution at different growth stages, and further improve the recognition stability.

[0021] More specifically, the control device used in the control method of supplemental lighting for tomato cultivation includes: The main control module, based on the STC8G2K64S4 chip, features abundant I / O interfaces and PWM channels to meet the needs of multi-channel dimming and data transmission. It includes a reset module, a download interface, and a 485 communication circuit. A two-stage voltage conversion power supply module is included to convert 3.3V to 5V and 24V to 5V. This power supply module contains capacitors such as C25 and C13 for filtering and voltage regulation, ensuring stable operation of the main control chip and peripherals. The main control module expands to provide 12 PWM signal outputs. The chip pin functions are clearly defined: RX2 and TX2 pins handle data transmission and reception, while ports P1, P2, P3, and P0 expand to provide multiple PWM signal outputs, supplying control signals for the 12 dimming circuits. The main control module's reset module uses a 10K resistor R1 and a reset button to restart the chip, ensuring rapid recovery in case of device malfunction. The image acquisition module uses a camera connected to a computer to acquire images of tomato plants and transmit them to the computer. The computer includes at least one memory and at least one processor to store programs and execute an improved YOLOv12 image recognition algorithm. After determining the tomato's growth stage, it generates hexadecimal instructions, which are transmitted to the main control chip via TX2 / RX2. The instruction format is "FA + stage code + FC FE + A1 BC" (FA is the frame header, FC FE is the frame tail, and A1 BC is the MODBUS16 data checksum). The instructions are as follows: seedling stage corresponds to FA 01 FC FE A1 BC, flowering and fruit setting stage corresponds to FA 02 FCFE A1 BC, fruit enlargement stage corresponds to FA 03 FC FE A1 BC, and maturity stage corresponds to FA 04 FC FE A1 BC. The main control module determines the tomato's growth status by recognizing the instructions and adjusts the light using PWM. The light sensor module, connected to the main control module, is used to collect and feed back ambient light intensity data; The 12-channel PWM dimming module is connected to the 12-channel PWM signal output terminals of the main control module. Each channel is based on a PT4115 chip and is equipped with 1K resistors (R14, R20, R23, etc.), 47uH inductors (L2, L4, L5, etc.), and 100uF capacitors (C13, C16, C18, etc.). Each PWM signal controls a group of LED strips, and the light intensity is precisely adjusted by adjusting the PWM duty cycle. It also has three WJ15EDGVC-3.81-8P series terminal blocks and one WJ15EDGVC-3.81-4P series terminal block. The three WJ15EDGVC-3.81-8P series terminal blocks are used to connect the positive and negative terminals of LED1-LED12 strips, and the WJ15EDGVC-3.81-4P series terminal block is used to connect the 24V power interface, GND interface, and 485A / 485B communication interface. The execution module includes 6 red light strips and 6 blue light strips, which are respectively connected to the corresponding branches of the 12-channel PWM dimming module.

[0022] Through the above steps, this device enables intelligent and precise control of supplemental lighting for tomato cultivation, effectively addressing the technical deficiencies of existing equipment and making it suitable for various large-scale tomato cultivation scenarios in facilities.

[0023] The above description of the embodiments is provided to facilitate understanding and use of the present invention by those skilled in the art. It is obvious to those skilled in the art that various modifications can be made to the embodiments, and the general principles described herein can be applied to other embodiments without creative effort. Therefore, the present invention is not limited to the above embodiments. Improvements and modifications made by those skilled in the art based on the disclosure of the present invention without departing from the scope of the present invention should be within the protection scope of the present invention.

Claims

1. A method for controlling supplemental lighting for tomato cultivation, characterized in that, Includes the following steps: S1. Growth Stage Identification: Tomato plant images are acquired using an image acquisition device, and the images are processed using an improved YOLOv12 image recognition algorithm to determine the current growth stage of the tomato. The improved YOLOv12 image recognition algorithm includes: adjusting the input image resolution according to the tomato growth status, replacing the original C3k2 module with a C2f-DCN module, embedding a bidirectional feature pyramid structure in the Backbone network, generating customized anchor boxes using the K-means++ algorithm, and using the EIoU loss function with the addition of class balance loss. S2. Light ratio matching: After receiving the growth period determination result, the main control chip calls the preset staged light parameter library and automatically sets the corresponding red and blue light ratio. In the staged light parameter library, the red and blue light ratio is 3-4:1 during the seedling stage, 5-7:1 during the flowering and fruit setting stage, 6-8:1 during the fruit enlargement stage, and 4-5:1 during the ripening stage. S3. Light intensity control: The light sensor collects ambient light intensity data in real time and feeds it back to the main control chip. The main control chip uses a fuzzy PID algorithm to control the brightness of 6 red light bands and 6 blue light bands by adjusting the duty cycle of 12 PWM signals, so as to stabilize the light intensity within the standard range corresponding to the current growth period.

2. The control method for supplemental lighting in tomato cultivation according to claim 1, characterized in that: In step S1, the image acquisition device acquires images of tomato plants every five days.

3. The control method for supplemental lighting in tomato cultivation according to claim 1, characterized in that: In step S1, the improved YOLOv12 image recognition algorithm adjusts the input image resolution as follows: 640×640 resolution is used during the seedling stage, and 1280×1280 resolution is used during the mature stage.

4. The control method for supplemental lighting in tomato cultivation according to claim 1, characterized in that: In step S1, the EIoU loss function is used to optimize the bounding box regression error, and the class balance loss is used to solve the problem of unbalanced sample distribution at different growth stages.

5. The control method for supplemental lighting in tomato cultivation according to claim 1, characterized in that: In step S3, the light intensity standards corresponding to the current growth period are: 2550-3825 LUX for seedling stage, 3825-5100 LUX for flowering and fruit setting stage, 5100-7650 LUX for fruit enlargement stage, and 3825-5100 LUX for ripening stage; and the daily light duration is 12-14 hours for seedling stage, flowering and fruit setting stage, and fruit enlargement stage, and 10-12 hours for ripening stage.

6. The control method for supplemental lighting in tomato cultivation according to claim 1, characterized in that: In step S3, the fuzzy PID algorithm dynamically adjusts the duty cycle of the PWM signal by receiving feedback data from the light sensor module in real time, ensuring that the light intensity remains stable within the corresponding standard range.

7. A control device for a supplemental lighting system for tomato cultivation, applied to the control method for a supplemental lighting system for tomato cultivation as described in any one of claims 1-6, characterized in that, Including: The main control module, based on the STC8G2K64S4 chip, includes a reset module, a download interface, and a 485 communication circuit. It is equipped with a two-stage voltage conversion power supply module that converts 3.3V to 5V and 24V to 5V. The power supply module contains C25 and C13 capacitors for filtering and voltage regulation. The main control module extends to 12 PWM signal output terminals. An image acquisition module, connected to the main control module, is used to acquire images of tomato plants and transmit them to the main control module; The light sensing module is connected to the main control module and is used to collect and feed back ambient light intensity data; The 12-channel PWM dimming module is connected to the 12-channel PWM signal output terminals of the main control module. Each channel is based on a PT4115 chip, equipped with a 1K resistor, a 47uH inductor and a 100uF capacitor, and has three WJ15EDGVC-3.81-8P series terminals and one WJ15EDGVC-3.81-4P series terminal. The execution module includes 6 red light strips and 6 blue light strips, which are respectively connected to the corresponding branches of the 12-channel PWM dimming module.

8. A control device for supplemental lighting in tomato cultivation according to claim 7, characterized in that: The main control module's reset module restarts the chip via a 10K resistor R1 and a reset button.

9. A control device for supplemental lighting in tomato cultivation according to claim 7, characterized in that: The three WJ15EDGVC-3.81-8P series terminal blocks are used to connect the positive and negative terminals of LED1-LED12 light strips, and the WJ15EDGVC-3.81-4P series terminal blocks are used to connect the 24V power interface, the GND interface, and the 485A / 485B communication interface.