2.1. Plant Materials and Field Conditions
According to the nutrients required for the growth cycle of maize, soil fertility, target yield, and local fertilization habits generally determine the amount of fertilizer applied to a single maize plant. The growth cycle of maize in Shihezi City, Xinjiang Uygur Autonomous Region, China, was taken as an example, and polypore urea (Shihezi Jintun Agrochemical Co., Ltd., Shihezi, China) was selected as the fertilization test material. The sowing test material was Xinyu No. 9 hybrid maize seed, which the Crop Research Institute of Xinjiang Academy of Agricultural and Reclamation Science produced. The moisture content was 9.1%, the 8-degree was 98.75%, and the 1000-seed weight was (274.22 ± 2.52) g [
32]. Three hundred seeds were randomly measured. The shape was horse-tooth, and the length, width, and height dimensions were (10.04 ± 1.06) mm, (7.45 ± 0.86) mm, and (5.50 ± 1.01) mm [
33]. The test site was selected in the soil tank laboratory of Xinchangsheng Agricultural Machinery Company, Shihezi, China. The experimental plot was flat and had no obstacles. The quality of soil preparation meets the requirements of agricultural technology. The length of the test area was more than 50 m, the size of the preparation area at both ends was not less than 10 m, and the width was more than 2 m, which meets the requirements of the experimental project.
2.2. Precise Simultaneous Sowed Control System
The control system hardware architecture integrates multiple essential circuits; notably, it features an STM32 microcontroller core to manage operations, an encoder interface for position feedback, a serial port debugging setup for diagnostics, a hall effect speed sensing mechanism, a dedicated power supply circuit, and a satellite GPS speed measurement receiver, along with any other ancillary components. The HS6602-485 GPS/Beidou dual-mode positioning module (Shandong Huxin Intelligent Technology Co., Ltd., Jinan, China) was selected to obtain the machine’s working speed. The working voltage is 5 V, the detection accuracy is 0.1 m·s
−1, the update frequency is 1~10 Hz, and the communication protocol is Modbus. The positioning information is transmitted to the microcomputer through the RS485 standard communication port with a baud rate capability of 115,200 bps. Regarding sensor installation, magnetic beads have been meticulously placed just under each seed hole in the seed plate. Along the rotation path of the outer groove wheel, matching magnetic beads are embedded at corresponding positions within the grooves. Additionally, hall sensors are affixed to the casing of both the seed metering apparatus and the fertilization box housing to facilitate precise tracking. The STM8-P12 and 545-P16 AB phase hall encoders (Bengbu Juhua Network Technology Co., Ltd., Benbu, China) are used to detect the speed of the fertilizer and seeding motors, respectively. To ensure precise monitoring of the motor’s rotation, the encoder plate was professionally welded onto the motor’s tail-end electrode and solidly anchored. The magnetic ring component is attached to the motor’s tail shaft and revolves in tandem with it. A hall effect sensor is integrated within the system which adeptly transforms the mechanical angular velocity of the motor’s rotation into a digital signal composed of alternating high and low levels. These signals are then conveyed to the microcontroller by way of the A/B phase channels. This particular module runs on a power supply voltage of 3 V. For voltage regulation, we deploy an SD-350C-12 power module (Taizhou Mingwei Automation Co., Ltd., Wenzhou, China), which efficiently reduces 48 V to a steady 12 V, catering to the power needs of the entire setup. We selected the NJK-5001A (CHE8-10PA-H710)-type hall sensor (Zhejiang Huchuang Electric Co., Ltd., Wenzhou, China), with a sensor rated current of 300 mA, rated operating voltage of 5~30 V, effective detection distance of 10 mm, rapid induction, accurate detection, output mode PNP-NO, response time below 2 ms, and thread diameter model M 8. The hardware components of the control system are illustrated in
Figure 1.
We chose the air suction precision metering device (Precision Planting Company, Normal, America) for its accuracy and efficiency. The diameter of the seed hole is 4.5 mm, and the number of seed holes is 9. The outer groove wheel fertilizer distributor was selected. The outer groove wheel has 3 grooves, the span of a single groove is 30°, and the diameter of the outer groove wheel is 70 mm. The seeding DC motor adopts the NC3SFN-6035-CVC carbon brush variable resistance brush DC motor (Transmotec Company, Stockholm, Sweden). The working voltage for this seeding motor is DC 12 V, the current is 5.6 A, the rated speed is 10,700 r·min−1, and the rated torque is 0.4468 N·m. The motor reducer adopts the three-stage deceleration gear mechanism developed by Heilongjiang Devo, and its deceleration ratio is 82.8125, which can provide enough torque to drive the seeding plate for the seeding DC motor. The fertilization DC motor uses the A58-555-1280 encoder DC motor (Shenzhen Xinyongtai Hardware Electronics Co., Ltd., Shenzhen, China). The working voltage is 12 V, the current is 6.3 A, and the rated speed is 3100 r·min−1. The motor reducer has a 16:1 reduction ratio and a torque of 1.0 N·m. The rated torque is the meshing transmission of the power output gear of the DC motor reducer and the outer gear of the seeding plate. We chose an Aisikong type AQMH3615NS-B DC motor (Chengdu Aikong electronic technology company, Chengdu, China) driver, suitable for the selected seed DC motor and fertilizer DC motor; the input voltage is DC 9~36 V, which can drive the rated voltage of a 12 V DC motor, the maximum load current is 12 A without heat dissipation, and it has three-wire control speed regulation, positive and negative rotation, and braking. The PWM effective range is 0.1~100.0%, and it can provide a 5 V power supply for single-chip microcomputer and interface with ESD protection.
The control flow of the automatic seed fertilization system is illustrated in
Figure 2. Upon powering on, the system operates based on user-defined parameters, including seed spacing, the distance and height between the seed metering device and fertilizer extractor, and the number of holes on the seed metering plate.
The GPS/Beidou module from Shandong Huxin Intelligent Technology Co., Ltd. in Jinan, China, detects the machine’s forward speed. The STM32 single-chip microcomputer from Zhengdianyuanzi (Guangzhou) Technology Co., Ltd. in Guangzhou, China, calculates the theoretical speed of the drive motor in real time. The motor speed sensor detects the speed of the seeding and fertilizer motor in real time. The hall sensor detects the time the fertilizer and seed are discharged. It starts when the fertilizer discharge device detects fertilizer information and stops when the seed discharge signal is detected. The position relation of the seed fertilizer determines the seed discharge time of the seed discharge device. The relative position of the seed and the hole fertilizer is obtained by comparing the theoretical and actual values. The fuzzy PID position ring adjusts the relative position of the seed and fertilizer until the surface seed corresponds to the fertilizer position. It does not work when the seed corresponds to the fertilizer position in the hole, which is when the time of the seeding plate corresponds to the theoretical time. When the seed does not correspond to the hole fertilizer, the fuzzy PID position ring works, and the seed discharge motor accelerates or decelerates to adjust the relative position of the seed and fertilizer.
2.4. Control Model of Fertilizer Alignment
Taking the Dvor 2BQD-18 electric drive pneumatic precision seeder (Heilongjiang Dewo technology development Co., Ltd., Haerbin, China) [
34] as an example, the operation process was to fertilize first and then seed. There was a certain installation distance between the fertilizer drop mouth and the seed guide mouth. To realize the correspondence between seed and fertilizer, it is necessary to determine the relative position of seed and fertilizer according to the time of seed and fertilizer drop. We assumed that the speed of the seeder did not change abruptly, and there was no bounce after the seed and fertilizer entered the soil.
When the groove of the outer groove wheel fertilizer distributor rotates to the fertilizer outlet of the fertilizer guide plate, the sensor generates a signal and transmits it to the single-chip microcomputer, and the single-chip microcomputer starts timing. When the seeds on the turntable of the metering device rotate to the metering port, the sensor generates a signal and transmits it to the single-chip microcomputer. The single-chip microcomputer stops timing. The seed fertilizer alignment model is shown in
Figure 4.
The fall of fertilizer is a free-fall movement. According to the fall time of fertilizer, the distance between the outer groove wheel fertilizer feeder and the suction seed dispenser, the fall time of seeds, and the operation speed of the machine, the time relationship that meets the relative position of the precise simultaneous sowing of seed and fertilizer was obtained as Equation (1).
where
v is the machine speed;
ttheory is the theory of planting waiting time;
t1 is the fertilizer time;
t2 is planting time;
t3 is the sum of sensor detection time, processor calculation time, and friction delay time of fertilizer falling between the shell and the fertilizer guide tube;
l1 is the longitudinal distance between seed and fertilizer;
l2 is the longitudinal distance between seeds and fertilizer. Assuming the fertilizer is in a free-fall motion,
t3 is obtained by the conventional method.
In this equation, vy is the initial velocity of the seed in the vertical direction, h2 is the height of the seed from the seed groove, and g is the falling acceleration, usually 9.8 m·s−2.
The actual speed of the planting plate can be calculated by the following Equation (5).
with
N2 for seeding motor encoder
T2 cycle captured pulse number;
M2 for a row of DC motor encoder resolution;
Oc2 for seeding motor encoder counting mode;
T2 for seeding DC motor speed sampling period, ms;
i2 for sowing gear transmission ratio. When seed and vertical direction are at the angle of
θ, seeding disc radius is
R, cm. The seed in the vertical direction of the initial speed
vy can be expressed as Equation (6).
vy is expressed in m·s−1. The difference between the theoretical waiting time and the actual waiting time is Δt = ttheory − tcurrent, where tcurrent is the actual planting waiting time, s. Comparing the waiting time of the theoretical seed arrangement with the actual seed arrangement waiting time, when Δt ≠ 0, there is a deviation in the position of the seed fertilizer, so the relative position of the seed fertilizer needs to be corrected.
2.5. Speed Control Model
After the system is started, the parameters such as seed spacing, working speed, and number of seed holes are set. The seed metering device of the fertilizer discharger enters the working state. The system obtains the real-time speed value detected by the satellite speed measurement module. The STM32 microcontroller calculates the target speed of the fertilizer discharge motor based on the working speed, and outputs a PWM signal to drive the DC motor. The outer slot wheel fertilizer discharger is then driven after the reducer decelerates. The encoder collects the actual speed of the fertilizer motor, and the PID control algorithm adjusts the output PWM control signal in real time based on the deviation. This ensures that the speed of the fertilizer motor can quickly and accurately follow the operating speed, and the speed of the seeding motor can be controlled in the same manner. The overall scheme of the seed and fertilizer sowing control system is illustrated in
Figure 5, based on the structure of the seed and fertilizer precision sowing control system.
Note that v is the machine forward speed, m·s−1; i1 is the transmission ratio of the fertilization reduction gear; i2 is the transmission ratio of the sowing deceleration gear; Xr sets the particle spacing, cm; Z1 is the number of external groove wheel grooves; Z2 is the number of holes in the row plate; M1 is the resolution of the fertilizer exhaust motor encoder; M2 is the resolution of the row-type DC motor encoder; N1 is the number of pulses captured in the encoder T1 cycle; N2 is the number of pulses captured in the encoder T2 cycle; Oc1 is the counting mode of the fertilizer exhaust motor encoder; Oc2 is the counting mode of the row-type motor encoder; nmanure is the target rotation speed of the fertilizer exhaust motor, r·min−1; nm-current is the feedback speed of the fertilizer motor, r·min−1; nseed is the target speed of the row motor, r·min−1; ns-current is the feedback speed of the type motor, r·min−1; u1(t) is the PWM control signal pulse of the fertilizer exhaust motor; u2(t) and u3(t) are the PWM control signal pulse of the motor; e1(t) is the deviation between the theoretical speed and the feedback speed of the fertilizer motor, r min−1; e2(t) is the deviation between the theoretical speed and the feedback speed of the type motor, r·min−1; e3(t) is the deviation between the sorting target time interval of the sorting motor and the actual time interval, ms; ec(t) is the rate of change of the deviation value of the row motor, ms−1; ttheory is the time difference of theoretical fertilizer discharge; h1 is the difference between the height of the seed tube and the seed groove; h2 is the height difference between the beginning of the fertilizer guide tube and the fertilizer ditch; l1 is the longitudinal distance between the seed tube and the fertilizer tube; l2 is the longitudinal distance between seeds and fertilizer; tcurrent is the time difference of the actual fertilizer discharge and planting.
The theoretical speed of the fertilization motor is
nmanure (r·min
−1).
The actual speed is
nm-current (r·min
−1).
The theoretical speed of the seeding motor is
nseed (r·min
−1).
The actual speed of the seeding motor is
ns-current (r·min
−1).
2.6. Control Algorithm
The speed control for sowing and fertilization utilizes the traditional PID algorithm, while the position control for seed and fertilizer utilizes the fuzzy PID control algorithm with gain adjustment. This approach addresses the limitations of the conventional PID parameters, which cannot be adjusted in real time. Additionally, the response time of the fuzzy PID controller is shorter compared to the conventional PID controller, making it more suitable for nonlinear systems. This allows for precise control of the seeding motor based on the position information of the seed and fertilizer under the rotation of the seed plate and the outer groove wheel, ensuring proper alignment of the seed and fertilizer. The controller structure is illustrated in
Figure 6. The error
e between the target value and the output value and the change rate
de/dt of
e is taken as the input of the fuzzy controller, and the PID parameters are adjusted online using the fuzzy control rules. The fuzzy controller first fuzzifies the input, then performs fuzzy reasoning, and finally defuzzifies the results of the fuzzy reasoning to output the three parameters of the PID controller:
Kp,
Ki, and
Kd. To achieve the effect of adaptive tuning of PID controller parameters, meet the different requirements of deviation
e and deviation
e change rate
de/dt on PID parameters [
33].
The fuzzy controller mainly comprises three modules: fuzzification, fuzzy inference, and defuzzification. The negative large [NB], negative medium [NM], negative small [NS], zero [ZO], positive small [PS], positive medium [PM], and positive large [PB] fuzzy subsets were selected. Considering the coverage and sensitivity of the universe, and to simplify the calculation of STM32F103ZET6, each fuzzy subset uses a triangular membership function [
35,
36]. According to the fuzzy rules of PID parameters, the corresponding output can be inferred according to the input deviation
e and the deviation change rate, etc. Firstly, the membership degree of
Kp,
Ki,
Kd corresponding to the fuzzy rules of
j (
j = 1, 2,..., 49) is obtained as Equation (11) [
37].
where
μr(j) represents the value of membership degree adjusted according to fuzzy rules under different
E and
EC conditions. The input of the PID controller is an accurate variable, so it is necessary to defuzzify the output of the fuzzy controller. This study uses the center of gravity method [
38,
39]. At a certain sampling time, according to the membership degree of the deviation, Δ
Kp, Δ
Ki, Δ
Kd can be obtained at this time.
Among them, Δ
Kp, Δ
Ki, Δ
Kd are the membership degree of the output of the
j-th fuzzy rule. The coefficients
αp,i,d can also be introduced to enlarge and reduce the variation in
Kp,
Ki,
Kd. The specific implementation formula is as follows:
The fertilizer sowing machine collects the working speed information through the sensor, determines the current speed deviation
e and the change in the current deviation and the last deviation
ec, and performs fuzzy reasoning according to the given fuzzy rules. Finally, the fuzzy parameters were defuzzified and the PID control parameters were output. The default parameter settings of the fuzzy PID algorithm are shown in
Table 1.
2.7. Test Method
For the electric drive system, the speed control accuracy and response speed of the motor directly affect the performance of seeding and fertilization of crops. To determine the optimal PID control parameters, PID parameter tuning experiments using different input step signals were conducted; the overshoot (
σ), rise time (
tr), adjustment time (
ts), and steady-state error (
ess) of the system when input step signal was selected serve as the indexes to evaluate the speed regulation performance. The target speed of the fertilizer motor was set to 1500 r·min
−1, the target speed of the seeding motor was set to 2000 r·min
−1, and the speed sampling period was 20 ms.
Kp,
Ki, and
Kd were determined according to the ‘first proportional, then integral, and then differential’ steps. The PID parameter adjustment of the position loop and the speed loop was determined by the mechanical transmission connection mode of the external load and the movement mode of the load, the load inertia, the requirements for speed and acceleration, and the rotor inertia and output inertia of the motor itself. The simple adjustment method was to adjust the gain parameter from small to large within the range of general experience according to the external load, and the integral time constant from large to small. The steady-state value without vibration overshoot was set as the optimal value [
33].
It was difficult to observe and sample the fertilizer once it was covered in the soil. To accurately measure the spacing and distribution of seeds and fertilizers, they would fall on the surface. The fertilizer apparatus was in the front, the seed metering device was in the rear, the longitudinal distance between the two was adjusted to 30 cm, and the transverse distance was adjusted to 10 cm. The height of the fertilizer apparatus from the ground was adjusted to 25 cm, and the height of the fertilizer guide pipe mouth was adjusted to 5 cm from the ground. The height of the seed metering device from the ground was adjusted to 60 cm, and the height of the seed guide pipe was 5 cm from the ground.
A fertilizer mass distribution experiment and co-sowing accuracy experiment were conducted to investigate the impact of different seed spacing and working speeds on fertilization performance and co-sowing accuracy. The sampling time of the speed of the seeding motor and fertilizer motor was set to 20 ms, and the feedback period of the operation speed was set to 1.0 s. The negative pressure was set to 4.0 kPa, the horizontal distance between seeds and the center of fertilizer application in holes was set to 3 cm, and the fertilizer application amount in each hole was set to 5 g. At the same speed, the grain spacing was adjusted to 20, 25, and 30 cm successively, and the distribution of fertilizer on the ground was measured at 2 km·h
−1, 3 km·h
−1, and 4 km·h
−1. In the direction of machine operation, the least dense area of fertilizer in the two holes was selected as the beginning and end of the single-hole fertilizer interval, and the fertilizer interval was successively divided into several sub-intervals at an interval of 2.5 cm. The number of fertilizer particles and the longitudinal distance between seeds and the fertilization center in each subinterval were measured in the stable operation area. The size of fertilizer particles was assumed to be evenly distributed in the fertilizer. The number of fertilizer particles in 10 holes conforming to the grain spacing standard was collected in each group. Five sections were randomly selected in each group, and 20 pairs of seed fertilizer longitudinal distances were recorded in each section. According to the industry technical specification document [
40], the qualified index for hole fertilization was determined by measuring whether the distance between the seed and the fertilizer center fell within the range of 3 ± 2 cm.