Precise Active Seeding Downforce Control System Based on Fuzzy PID

Soil compaction is an important procedure of precision seeding operation. In this paper, a precise downforce control system based on fuzzy PID was proposed in order to improve the quality of the soil compaction and the accuracy of setting working parameters. -e conventional mechanism of seeders for soil compaction was optimised. -e compressing spring of the compaction mechanism was replaced by a linear motor, which is actively controlled to adjust downforce in real time. A force sensor was connected in series with the linear motor to detect the actual downforce from a press wheel acting on soil. -e detected downforce was employed as feedback for the fuzzy PID model. A slave real-time control system was constructed by using an STM32 microcontroller. A user interface was designed for the portable master computer system based on the ForLinx embedded platform to facilitate the setting of target downforce and display the actual downforce in real time. Meanwhile, it was able to adjust the system for different operating requirements, such as soil stiffness, moisture, and crop species. Experiments were conducted on a soil bin, and the results indicated that the active control system has better performance than the conventional passive system in downforce control. -e downforce was stable with a variance less than 2.6% under different conditions, and it was 8.11% less than the conventional passive system.


Introduction
With the acceleration of agricultural development, researchers had done lots of works on the precise and active seeding [1,2]. In reference [3], a pneumatic system is designed to realize the active adjustment of sowing depth. In reference [4], the displacement sensor and the ultrasonic sensor are used to measure the trench depth, and the monitoring of the trench depth is realized by controlling the hydraulic cylinder. us, the precise and active seeding will be the future development direction.
As an important part of seeding operation, soil compaction (SC) is key to seed germination, emergence, and growth [5][6][7]. Inconsistent soil compaction will affect the uniformity of crop emergence and then affect crop yield [8]. e existing methods by using springs to apply loading downforce on compaction mechanism to achieve proper SC has been employed for decades. It is difficult to set a target downforce value accurately because it depends on individual experience of an operator to adjust the compress spring force. Meanwhile, the stability of the downforce is affected by uneven soil densities and fluctuating soil surfaces after seeding drills.
In order to improve the performance of seeders, researchers throughout the world have done some research. A profiling elastic press wheel was designed in a recent study [9,10]. e structure of the profiling elastic press wheel was retrofitted from the conventional press wheel. Traditional rigid spokes replaced with spring-spokes spring-loaded structures were cancelled. During working, the spring-spoke deformation caused wheel deformation when the wheel encountered an uneven soil surface to form a uniform SC. However, in order to achieve required soil compaction strength, the spring should be adjusted according to the experience of operators at the beginning of the work. Another novel innovation was used in a seeder whose unique character was to adjust loading forces on compaction mechanism automatically by using a hydraulic system [11].
A force sensor was added to the press wheel to measure the downforce of the press wheel applied on fields in real time. If the downforce changed because of uneven soil condition, a hydraulic cylinder, part of the hydraulic system, was controlled by operators to ensure a consistent downforce to achieve a uniform SC, yet the results of the SC also depended on the experience of operators. erefore, an applicable automated downforce control system is significant to ensure the even downforce loading on the soil ground to achieve the uniform and consistent SC.
is study purposed and evaluated a precise active seeding downforce control method based on fuzzy PID. Moreover, a fast, automatic, precise, and self-adjustable control system of the downforce was implemented.

System Structure and Operation Principle.
e structure of the system is shown in Figure 1. e system consists of a control system and mechanical structures.
e control system includes a master computer system and a slave realtime control system, where the slave real-time control system contains a force sensor, a slave computer controller, a motor driver, a sensor signal amplifier, and a power supply. As shown in Figure 2, the structure of the compaction mechanism contains a rack, a wheel frame, a press wheel, a linear motor, and a force sensor. When the entire system works, the target downforce was set by using a user interface. e slave real-time control system detects loading forces exerted by the linear motor on the compaction mechanism using the force sensor. e slave real-time controller compares the value of the detected downforce with a target value to obtain the difference. en, the slave real-time controller can adjust the loading force on the press wheel by controlling the linear motor to eliminate the difference, so that the closed-loop control of the downforce is achieved. e master computer system was designed to display and store actual downforce values in real time. Figure 2, the force sensor was connected in series with the linear motor. One side of the force sensor was articulated with the rack and the other side was articulated with the press wheel frame. As shown in Figure 3, force was analysed with reference to the structure of the compaction mechanism. Segment AB represents the rack. Point A represents the fixed connection point of the press wheel frame with the rack, and Point C represents the hinge point of the force sensor with the rack. Furthermore, Point D represents the hinge point of the linear motor with the press wheel frame support frame, and point E represents the axis of the press wheel.

Mathematical Model of Downforce Detection. As shown in
According to the principle of moment balance, the downforce of the linear motor acting on the press wheel is shown in the following equation:    Mathematical Problems in Engineering where F C D is the force of the linear motor on the press wheel frame (N); F CD ′ is the vertical component of force exerted by the linear motor on the press wheel frame (N); F is the force of the press wheel frame on the press wheel (N); |A D| and |AE| represent the individual side lengths, respectively (mm); and θ is the inclination angle of the press wheel frame and rack°).
According to Newton's second law, the force exerted by the press wheel frame on the press wheel is expressed in the following equation: where F t is the traction of the press wheel frame to the press wheel (N), F T is the force of the rack on the press wheel frame (N), and F CD ″ is the horizontal force of the linear motor on the press wheel frame (N).
In the process of sowing, the deformation of the press wheel was small, which can be seen as a rigid body without elastic deformation. If the soil under the press wheel flows to both sides, the soil at the upper edge and the center of the ground would be compacted to the same degree. In this way, the vertical force of the press wheel on the ground is the downforce which is expressed as follows: where Q is the downforce (N), Q ′ is the reaction of soil to the press wheel (N), and G is the gravity of the press wheel (N).
In the process of sowing, the resistance of the wheel was related to the soil conditions. Generally, the horizontal resistance of the roller was expressed by the rolling friction resistance f between the wheel and the ground, and the rolling resistance of the wheel bearing was ignored. e force of the pressing wheel in the horizontal direction is shown in the following equation: where f is the friction force between the press wheel and the ground (N) and f 0 is the rolling friction coefficient of the press wheel. According to equation (1) to equation (4), the mathematical model of the downforce, Q, of the press wheel and the force sensor detection value, F C D , was obtained as shown in the following equation: In practical work, the coefficient of rolling friction of the soil to the press wheel after drilling was 0.22 [14]. According to the design of the mechanical structure, the angle of θ in the actual work changes between 40 0 and 50 0 and 0.184 ≤ f 0 tan θ ≤ 0.262, so f 0 tan θ takes 0.223. Meanwhile, 1.299 ≤ cos θ + sin θ tan θ ≤ 1.554, so cos θ + sin θ tan θ takes 1.427. e measured |AD| is 355 mm, and |AE| is 585 mm. ese parameters were substituted in equation (5) to get the mathematical model of downforce detection, as shown in the following equation: 2.3. Design of the Fuzzy PID Control Algorithms. e system was time-varying, hysteresis, and nonlinear. It was difficult to establish a precise mathematical model that can be used. erefore, according to the characteristics of working, fuzzy PID algorithms with the characteristics of set theory, language variables, and logical reasoning were used to achieve an effective control.

Design of Fuzzy PID Controller.
e basic principle of the fuzzy PID controller was briefly described as follows: firstly, the control rules were established according to the relationship between the revised parameters of the PID control and the displacement error E and the error rate E c of the fuzzy control, as well as the loading characteristics of the linear motor. en, E and E c were used as input and PID parameters which are automatically adjusted online according to the rules of fuzzy control to meet the requirements of E and E c in different conditions, so that the system can have better response characteristics. According to the analysis above, the diagram of the fuzzy PID controller is designed and shown in Figure 4. e comprehensive control strategy of the downforce includes a fuzzy controller and a PID controller. e input of the fuzzy controller was the downforce error E and the error change rate E c , while the output was three repair parameters of the PID controller, ΔK p , ΔK i , and ΔK d . e values of three parameters of the PID controller are calculated by the following equation: where K p , K i , and K d represent the initial values of proportion, integral, and differential, respectively. ]. e fuzzy subset was {NB, NM, NS, ZO, PS, PM, PB}, and they were negative big, negative medium, negative small, zero, positive small, positive medium, and positive big, respectively. According to the basic universe of each variable and their quantization grade, the quantization factor and the proportion factor could be calculated as follows:

Determination of the Membership Function.
Common membership functions of three fuzzy states are triangle, Gaussian, s, and Z. Currently, there were no mature and effective methods to establish a perfect membership function. Most of the methods of establishing membership functions were still based on experience and experiments. Although the forms are not exactly the same, there are different ways to solve and deal with the problem of actual fuzzy information as long as the same fuzzy concept could be reflected. Since the triangle membership function had several advantages, such as less memory occupied, simple operation, and suitable for online parameter adjustment, it was selected for the fuzzy control, as shown in Figure 5.

Establishment of Fuzzy Control
Rules. Fuzzy control rule was key for the fuzzy control. e rule was established on the basis of practical experience, according to the magnitude of input value at different time in the process of noncontrolling and the relationship among three modified parameters. According to the working characteristics of the system and the relationship of the parameters of the fuzzy PID, the fuzzy control rules were designed as given in the following. e fuzzy rules of ΔK p . e function of the proportional coefficient, ΔK p , was to speed up the response of the system and improve the adjustment accuracy of the system. e larger ΔK p makes, the faster the response and the higher the adjustment precision of the system were. However, it was easy to produce overshoot and even lead to instability of the system. If the value of ΔK p is too small, the adjustment precision would be reduced and the response would be slow. In addition, adjustment time would be prolonged, and static and dynamic characteristics of the system will be changed. e fuzzy rules of ΔK p are given in Table 1. e fuzzy rules of ΔK i . e function of the integral action coefficient, ΔK i , was to eliminate the steady-state error of the system. e larger the ΔK i makes, the faster eliminated the static error of the system would be. However, if ΔK i was too large, integral saturation will occur in the initial stage of the response process, which would lead to a larger overshoot during the response processing. If ΔK i was too small, it would make the static error of the system difficult to be eliminated so as to affect the adjustment accuracy of the   system. According to the requirements of working, the table of fuzzy control rules for ΔK i is as given in Table 2.
e fuzzy rules of ΔK d . e differential action coefficient, ΔK d , could improve the dynamic characteristics of the system. Its main function was to restrain the variation of deviations in any directions during response and to forecast the variation of deviations in advance. However, the excessive ΔK d would make the response brake ahead of time, so prolonging the adjustment time and reducing the antijamming performance of the system. According to the requirements of working, the table of fuzzy control rules of ΔK d is as given in Table 3.

Determination of Fuzzy Decision Method in Fuzzy
Controller.
e result of fuzzy reasoning was a fuzzy quantity, which was a group of fuzzy vectors with multiple membership values. e output signal of the control system was a definite value. erefore, for the application of the fuzzy control, the fuzzy output of the controller should be transformed into a definite value in order to get better output results and more precise control effect. e method of gravity center with a high frequency was used by many researchers to achieve nonfuzzification from the fuzziness obtained by reasoning to the precise quantity, as shown in the following equation:

PWM Control.
e software operation result of fuzzy PID was applied to the control of the hardware circuit by PWM technology. PWM technology is a very effective technology which used the digital output of the microprocessor to control the analog circuit. By modulating the width of a series of pulses, required waveform could be equivalently obtained, that was, by changing the ratio of the on time to the total time, that was, the duty cycle, to achieve the purpose of adjusting the voltage and frequency. In this paper, the real-time control of downforce was based on the calculation of the fuzzy PID module by the microcontroller, and the result of calculation was used for the control of parameters of the PWM duty cycle to realize PWM output voltage adjustment and then complete the control of the linear motor.

Interface Design of Master Computer.
e downforce monitoring interface is shown in Figure 6. It includes communication setting module, system parameter module, parameter setting module, and dynamic curve display module. In the operation, the user sets the downforce target value through the input box, monitors the operation effect in real time through the data display curve, monitors the communication status through the communication data block, and saves the downforce data in the system background for later analysis.

Program Design of the System.
e master computer system communicates with the slave real-time control system through the serial port. e default communication baud rate is 115200b/s, 8-bit data and no check bit. e master computer system was used for parameter setting, data display, and save. e slave real-time control system was used to collect the value of the force sensor in real time and to calculate the downforce value according to the force model. According to the target value, the downforce value and the fuzzy PID controller adjusted the linear motor to realize the real-time control of downforce. e operation parameters were returned to the master computer system in real time.
e flowchart of the system is shown in Figure 7.

Experimental Equipment and Conditions.
e experiments were conducted based on a soil bin and powered by a John Deere 354 tractor. e experimental devices are shown in Figure 8.

Mathematical Problems in Engineering
Before the experiments, the soil was prepared to simulate the conditions of fields. e soil moisture content, firmness, and the height difference of soil undulation per unit area were measured. ree groups with 60 measurement points in total were evenly selected within the range of the soil through test benches. e measured data are given in Table 4.

Performance Experiments of Control System.
e purpose of static experiments was to verify both the accuracy of the downforce detection model and the control performance of the system under static conditions. e experimental setup is shown in Figure 9.
e force sensor (f ) was situated under the press wheel to detect actual downforces on the ground from the press wheel and recorded the measured value of the force sensor as the actual value. e target downforce was set as 600 N, 1000 N, and 1400 N. e linear motor was adjusted by the control system, and the actual downforce value was measured by the force sensor (a), recorded as the detected value. e experimental data curve is shown in Figure 10. e average value and the correlation between the detected force of the system and the target force calculation equation were shown as equations (10) and (11) [12]: where X i is the collected value of the control system, recorded as the detected value; X is the mean of the collected value; Y i is the measured value from the force sensor, recorded as the actual value; Y is the mean of the actual force; N is the total number of data acquisition; s is the standard deviation of the measurement points; and where V is the variation coefficient of the downforce and U is the stability coefficient of the downforce. According to Figure 10 and equations (10) and (11), the stability of the control system was calculated when the target value was 600 N, 1000 N, and 1400 N, respectively, as given in Table 5.
According to Table 5, through the comparison between the actual downforce values and the system detection values, the correlation coefficient was 97.1% when the set value was 600 N, while it was 98.8% and N98.5% when the set value was 1000 N and 1400 N, respectively. e results indicated that there was a strong correlation between the actual downforce and the system detection value, indicating that the downforce detection model was reliable. According to Figure 10 and equations (10) and (11), the response time a was calculated when the target value was 600 N, 1000 N, and 1400 N, respectively, as given in Table 6.
According to Table 6, in order to measure the system performance, the rise time of the system from 0 N to the target downforce value was the system response time and the system from 0 N to the stability status of the target downforce value was the adjustment time. When the target value was 600 N, 1000 N, and 1400 N, the response time of the system was 0.5 s, 0.8 s, and 1.5 s, respectively, and the adjustment time of the system was 0.8 s, 1.1 s, and 2.4 s, respectively. e stability coefficient of the system was 98.64%

Stability Experiments under Different Target Downforce
Values.
e target downforce was set as 600 N, 1000 N, and 1400 N, respectively, and the forward speed of the tractor was 5 km/h during the tests. e downforce value is shown in Figure 11.
According to Figure 11, when the local table was relatively flat, the downforce value was relatively stable, while if the downforce value had a significant fluctuation, the system timely carried out feedback adjustment, so that the downforce was stable within a range of changes although there were fluctuations. Moreover, the downforce stability coefficient was calculated based on equations (10) and (11) as given in Table 7.
When the target value was 600 N, 1000 N, and 1400 N, the average error range was within 200 N and the coefficient of variation was 5.91%, 6.77%, and 4.17%, respectively. In the condition of different target values, the difference of coefficient of variation of the actual pressure values was less than 2.6%. us, the impact of pressure values on system performance under different targets was obtained.

Stability Experiment of Different Downforce Control
Regulations. In order to further verify the reliability of the system, the system was compared with the conventional regulation. In this experiment, other parameters were the same except the downforce control mode. e ordinary method usually loads the downforce by springs without downforce detection modules. erefore, the downforce detection module in this paper was added onto the mechanical compaction mechanism to achieve downforce detection. e mechanical downforce regulating structure cannot be set because of the restriction of spring characteristics. Hence, the downforce was set as 600 N according to experience. Comparative experiments were conducted, and the results are given in Table 8.
According to Table 8, in terms of the conventional method, the stability coefficient of the downforce was 85.98%, while that was 90.84% by using the proposed method. e results showed that the stability coefficient of the downforce based on the control system was higher than that of the conventional method, so the system improves the stability requirements of the downforce and provides a reference for the downforce control method of seeders.

Discussion
In the experiment, the response time, adjustment time, and stability of the system were tested, according to the requirements (stable, accurate, and fast) of the control system. e shorter the response time and adjustment time of the system are, the higher the sensitivity of the system is, but lower the stability and anti-interference ability of the system are. e performance of the system was analysed at the speed of 5 km/h, and in actual working, if work speed increased, the interference frequency could be fast, so that the work effect could be reduced. erefore, how to improve the universality of the system with different operating speeds should be further studied.

Conclusions
(1) is paper proposed an active downforce control method to deal with the limitation of the mechanical downforce control structures. A precise active seeding downforce control system based on fuzzy PID was designed, and the control system was developed for the uniform compaction of seeding by controlling the downforce in real time.
(2) A graphic-based user interface was developed on a master computer system. Parameters for seeding operations could be set easily by this interface, which could highly reduce the requirements for operators. (3) e experimental results showed that the active downforce control mode was stable and reliable. At the operating speed of 5 km/h, the stability coefficient is 90.84%, which is better than 85.96% of the traditional control mode, and downforce is stable with a variance less than 2.6% under different target values. Moreover, downforce could be adjusted for different crops and working conditions without the modification of seeder structures, which improved the generality of the system.

Data Availability
e data used to support the findings of the study are available at https://pan.baidu.com/s/1K2idiaiMCuVG5LDvP7Ll9g.

Conflicts of Interest
e authors declare that there are no conflicts of interest regarding the publication of this paper.

Authors' Contributions
is paper was guided and modified by Yu Tan, Jian Chen, and Xingxing Liu.