Sunteți pe pagina 1din 10

Computers and Electronics in Agriculture 52 (2006) 110

Adaptive modeling and control of a manure spreader for precision agriculture


Manu Krishnana , Christopher A. Fostera , Richard P. Strosserb , James L. Glanceya , Jian-Qiao Suna,
a

Department of Mechanical Engineering, University of Delaware, Newark, DE 19716, United States b CNH America LLC, 500 Diller Ave., New Holland, PA 17557, United States Received 16 May 2005; received in revised form 1 November 2005; accepted 28 November 2005

Abstract This paper describes a general modeling and control approach for automating various agricultural machines for precision farming applications. Experimental validation of control designs was performed on a modied New Holland manure spreader. An adaptive numerical modeling approach for describing the system inputoutput dynamics is proposed, and an optimal control that accounts for the control hardware limits is developed. Field tests have demonstrated the effectiveness of the theoretical development. 2006 Elsevier B.V. All rights reserved.
Keywords: Adaptive control; System identication; Precision agriculture; Embedded control; Manure spreader

1. Introduction Precision agriculture may be dened as a systems based approach to manage spatial and temporal variability for sustainable protability (Straub et al., 1998). This approach can not only decrease costs, but can also increase yields. Furthermore, accurately applying chemicals and fertilizers only where needed reduces the potential for ground and surface water pollution. Manure produced by livestock contains valuable nutrients for crops. At the present time existing commercially available non-liquid manure spreading equipment does not control the amount of manure applied per unit area in the eld. Additional fertilizers are often applied to ensure the crop production. Excessive applied manure and fertilizer contributes to ground and surface water pollution and also increases the cost of crop production. There is a need to develop an automated spreader in order to achieve consistent and precise application of crop nutrients. At present, none of the major equipment manufacturers offer an automated system capable of interfacing with available non-liquid equipment for precision agriculture applications. The objective of the study presented in this paper is to develop control algorithms for automating a manure spreader made by the New Holland for precision agriculture applications. Straub et al. (1998) described a computer controlled manure spreader developed by John Deere Corporation in collaboration with the University of Wisconsin-Madison, and carried out eld tests indicating that the control

Corresponding author. Tel.: +1 302 831 8686; fax: +1 302 831 3619. E-mail address: sun@me.udel.edu (J.-Q. Sun)

0168-1699/$ see front matter 2006 Elsevier B.V. All rights reserved. doi:10.1016/j.compag.2005.11.005

M. Krishnan et al. / Computers and Electronics in Agriculture 52 (2006) 110

system worked well with lighter and dryer manure. One of the problems they faced is how to measure the manure discharge. In their control system, the weight of the spreader is measured over time and a nite difference method is used to compute the discharge rate. Malgeryd and Wetterberg (1996) presented one of a series of studies to characterize manure as an inhomogeneous material. There are inherent difculties in developing an analytical model for the manure material. The material is a highly inhomogeneous mix of solids and liquids, and varies from batch to batch. The study reported by Malgeryd (1994) has formed a basis for setting the European standard for manure and slurry spreaders. High-performance controllers, including a supervisory control and a control with a Kalman lter and a Smith predictor for time delay, have been developed by Munack et al. (2001). Magnetic inductive owmeters are used to measure the manures ow rate. Landry et al. (2004, 2005) recently studied physical and rheological properties of manure and investigated the effectiveness of conveying systems for manure spreaders. The present study proposes to sense the weight of the manure remaining in the tank and calculate the discharged material. The present study also develops an on-line system identication algorithm. A numerical regression model is designed to describe the inputoutput dynamics of the spreader. The parameters of the numerical model are updated in real time to account for the time varying and nonlinear properties of the spreader dynamics. The remainder of the paper is organized as follows. In the section below, we describe the objectives of the research and a description of the hardware and software system. Then we present a discussion of numerical modeling of the inputoutput dynamics of the spreader and an experimental validation of the model. The adaptive optimal control for regulating the discharge rate of the spreader is subsequently developed. Experimental results from eld tests are presented to demonstrate the effectiveness of the proposed control system. 2. Research objectives and system description The manure spreader considered in this study is a variable rate precision machine for animal wastes. The spreader has two augers which convey material to the rear gate. Two spinning disks spread the material onto the eld. A picture of the machine (Model 308 Spreader, New Holland, Pennsylvania) is shown in Fig. 1. The auger speed and the gate opening size can be controlled. The objective of the control algorithm is to regulate these two quantities for a pre-determined spreading application density per unit area. As an example, the control task set for the present study is to attain a specied constant discharge mass per unit area from the spreader taking into account varying speed of the tractor and the material variability of the semi-solid animal wastes. It is assumed that the spreading width of the material is a constant. Note that the auger speed is adjusted by varying the swash plate angle of the hydraulic pump. In order to develop control algorithms to achieve the above objective, we must rst develop a dynamic model for the spreader. Specically, we need a relationship between the input, i.e. the auger speed and the gate opening size, and the output, i.e. the material discharge rate. Recall that the material is a highly inhomogeneous mix of liquids and solids with unknown percentage of each phase. The weight and viscosity of the material affect the dynamics of the hydraulic system that drives the auger. As the spreading proceeds, the amount of material remaining in the tank changes. All these factors attribute to a nonlinear and time-varying dynamics of the spreader. As discussed in Section 1, analytical modeling of such a system is a difcult task.

Fig. 1. A picture of the spreader and tractor considered in the present study.

M. Krishnan et al. / Computers and Electronics in Agriculture 52 (2006) 110

In this study, we propose to develop an on-line numerical model of the inputoutput relationship, known as the system transfer function. The on-line model is obtained by using the New Holland controller (HCM, New Holland, Pennsylvania). The controller has an Intel processor 80C196CB with 100 Hz frame rate. It communicates with a laptop computer via RS232 at 9600 baud. This controller can interface with and control a wide range of equipment including variable rate applicators for precision agriculture. 3. On-line system modeling The on-line system model ts the experimental data to a pre-determined numerical model with undetermined coefcients. A very common numerical model that can describe a large class of dynamic systems is the autoregressive model with exogenous inputs (ARX) (Billings, 1986; Diaz and Desrochers, 1988; Ljung, 1987). It is given in a general form as yn + a1 y(n1) + + ana y(nna ) = b1 u(nnk ) + + bnb u(nnk nb +1) . (1)

The current output yn is assumed to be a function of a nite history of output values y(n1) to y(nna ) and the delayed input u(nnk ) to u(nnk nb +1) . The coefcients ai (i = 1, . . . , na ) and bj (j = 1, . . . , nb ) are undetermined. The online modeling algorithm determines the coefcients and approximates the numerical model to the measured system dynamics in some optimal manner. Strictly speaking, the ARX model is valid for linear dynamic systems. The present spreader system is time varying and nonlinear. A properly identied ARX model will accurately represent the dynamics of the system over a short time interval and will not be valid for the entire history of the spreading task from a full tank to empty. Therefore the ARX model must be updated frequently during spreading. Efcient real-time adaptive algorithms will be needed for this task. 3.1. Adaptive algorithm In signal processing, the ARX model is also known as an innite impulse response (IIR) lter (Haykin, 1991). A popular steepest gradient descent method known as the least mean square (LMS) algorithm (Widrow and Stearns, 1985) can be used to adjust the coefcients of the ARX model and minimize the error between the prediction of the numerical model and the real measurement. The estimation error is ek = dk yk , where dk is the measured output and yk is the predicted output. A performance index can be dened as J(k) = e2 . We write the ARX model in a vector notation as k yk = wT uk , k wT k (2)

where is a vector consisting of the undetermined coefcients at the kth time step and uk is a vector consisting of both the past history of yk and the control inputs. The LMS algorithm for updating the undetermined coefcients in order to minimize J(k) is given by w(k+1) = wk + ek uk . where is an adaptation gain parameter. 3.2. Experimental validation of the LMS algorithm We have selected a simple ARX model for the spreader given by yk = a1 y(k1) + a2 us (k1) + a3 u(k1) ,
g g

(3)

(4)

where us (k1) denotes the swash plate angle that regulates the auger speed and u(k1) is the rear gate opening. We have carried out experiments to compare this simple model with more complicated ones, and found that this model describes the system with a good balance of accuracy and efciency, and is sufcient for our work. Figs. 2 and 3 show the measured data from spreading a full load of farmyard manure consisting of cow urine and feces, straw and mud. A digital second order IIR low pass lter of bandwidth 2 Hz programmed in the C language is

M. Krishnan et al. / Computers and Electronics in Agriculture 52 (2006) 110

Fig. 2. Time histories of the swash plate opening (top) and the rear gate opening (bottom) during the test for system identication.

used to block noise in the weight signal. The weight signal is sampled at a rate of 100 Hz in real time. The weight sensitivity is 0.1828 mV/kg, and the resolution of the data acquisition is 26.6952 kg/bit. During spreading, the gate positions are xed for a period of time during which the swash plate is swept from being completely closed to being fully open to adjust the auger speed. Four different gate openings at 25, 50, 75 and 100% are used as shown in Fig. 2. The purpose of doing so is to create a set of data from one test run that excites as much of the system dynamics as possible. The results of the model prediction and the parameter adaptation with the LMS algorithm are shown in Figs. 3 and 4. The model prediction is seen to be quite accurate. The parameter a1 is nearly equal to one. This is physically reasonable since in the absence of the control, i.e. when the auger speed is zero and the gate is closed, the material remaining in the tank is unchanged. The parameters a2 and a3 are negative. It is again physically reasonable that a2 and a3 are negative. When the control inputs are greater than zero, the material remaining in the tank yk decreases. The ranges of these coefcients are as follows: max(a1 ) = 1.0047, min(a1 ) = 0.9881, average a1 = 1.0011; max(a2 ) = 0.0083, min(a2 ) = 0.0111, average a2 = 0.0094; max(a3 ) = 0.0045, min(a3 ) = 0.0080, average a3 = 0.0063.

Fig. 3. Time history of the mass remaining in the tank during the test for system identication. The prediction and the measurement data are overlapped.

M. Krishnan et al. / Computers and Electronics in Agriculture 52 (2006) 110

Fig. 4. Variation of the parameters of the numerical ARX model with time.

4. Control algorithm The control algorithm design depends on the system model. Since the IIR lter for modeling the system transfer function is updated as the spreading goes on, the resulting controller that contains the updating algorithm is called a self-tuning controller (Slotine and Li, 1991). A block diagram of such a controller is shown in Fig. 5. This section focuses on a discussion of the control algorithm design. The integration of the control loop and the parameter updating loop is natural and is coded in the software. The estimator for updating the model parameters needs two inputs, namely the control and the plant output. The controller takes three inputs: the reference signal, the parameters of the numerical model and the plant output. The control is calculated based on the numerical model as if it were the true plant. This is called the certainty equivalence principle (Slotine and Li, 1991) . We developed an optimal control that could account for the time-varying parameters of the model and the control hardware limits in a systematic way. 4.1. Unconstrained optimal control
ref Let yk denote the desired discharge time history. Dene an error such that ref ek = yk yk .

(5)
g

From Eqs. (4) and (5), we have


ref ref T ek = a1 e(k1) + a2 us (k1) + a3 u(k1) + a1 y(k1) yk = a1 e(k1) + c(k1) u(k1) + Gk1

f (k1) (e(k1) , u(k1) , Gk1 ),

(6)

Fig. 5. The block diagram for the self-tuning control.

M. Krishnan et al. / Computers and Electronics in Agriculture 52 (2006) 110

where c(k1) = {a2 , a3 }T ,


T u(k1) = {us (k1) , u(k1) } , g ref ref Gk1 = a1 y(k1) yk .

(7)

Dene a performance index with a terminal cost:


N1

Ji = (N, eN ) +
k=i

Lk (ek , uk ),

(8)

1 1 T where (N, eN ) = 2 sN e2 and Lk (ek , uk ) = 2 (qe2 + uk Ruk ). The scalar q and the 2 2 matrix R weigh the state and N k the control effort, respectively. The initial time step is denoted i and N is the number of steps to control the system, known as the terminal time. The target set (eN , N) for the control is dened as eN = 0. The Hamiltonian of the system is given by

H k = Lk (ek , uk ) + k+1 f k (ek , uk , Gk ),

(9)

where k+1 is a Lagrange multiplier. Lewis and Syrmos (1995) have shown that after going through the steps of optimal control solutions and taking i = k and N = k + 1, we obtain the unconstrained optimal control solution as
T uk = (R + ck ck sN )1 ck sN (a1 ek + Gk ).

(10)

More complicated and effective controls can be obtained by taking N > k + 1 at the price of more computational effort. We have found that this so-called one step optimal control is sufcient for our purpose. However, more research needs to be done to study the effect of multiple step control designs. 4.2. Range limited optimal control We shall continue the study with the one step optimal control. Recall that the range of us and uk is nite. The k unconstrained optimal solution (10) is valid when the bound is not exceeded. To account for the bounds on the controls, we need to use the Pontryagins minimum principle (Lewis and Syrmos, 1995) . This leads to the following inequality for determining the optimal control uk :
1 T 2 uk Ruk 1 T T T + ck uk 2 uk Ruk + k+1 ck uk . k+1 g

(11)

The inequality holds for all admissible values of uk . The optimal control can be found from the inequality by considering an auxiliary problem of minimization of the following quadratic form:
1 w = 2 (uk + R1 ck k+1 )T (uk + R1 ck k+1 ).

(12)

It can be shown that the uk that minimizes w also minimizes the left hand size of the inequality (11) (Lewis and Syrmos, s,g s,g s,g 1995). Let the lower and upper bounds of the control be denoted by ukmin and ukmax . Let Uk denote the swash plate and gate opening control elements of the vector in Eq. (10), i.e.:
T Uk = [(R + ck ck sN )1 ck sN (a1 ek + Gk )]s,g . s,g

(13)

After several algebraic steps, we obtain the range constrained optimal control as s,g s,g s,g ukmin , Uk ukmin s,g s,g s,g s,g s,g uk = Uk , ukmin < Uk < ukmax . s,g s,g s,g ukmax , Uk ukmax

(14)

The middle branch of the solution is the same as that in Eq. (10). In other words, when the system operates within the physical limits of the controls, the solution given by Eq. (10) is optimal. Note that when the number of inputs is greater than the number of outputs, the matrix R cannot be zero, and has to be positive denite.

M. Krishnan et al. / Computers and Electronics in Agriculture 52 (2006) 110

4.3. Rate limited optimal control The range limited optimal control problem implies that the controls can be instantly switched from one level to another. This is of course not realistic since a physical device always takes a nite time to change and has inherent delays. When the controller requires the system to change faster than the physical rate limit, a rate saturation occurs. To account for the rate limits, we once again invoke the Pontryagins minimum principle and consider the increment u(k1) such that uk = u(k1) + u(k1) as the control variable. Applying the Pontryagins minimum principle in terms of the control increment, we have another inequality
1 2 (u(k1)

u(k1) )T R(u(k1) +

T u(k1) ) + ck (u(k1) + k+1

u(k1) )

1 2 (u(k1) +

u(k1) )T R(u(k1) +

T u(k1) ) + k+1 ck (u(k1) +

u(k1) ).

(15)

The optimal control increment can be found from the inequality by considering an auxiliary problem of minimization of the following quadratic form:
1 w = 2 (u(k1) +

u(k1) + R1 ck k+1 )T (u(k1) +


s,g

u(k1) + R1 ck k+1 ).

(16)

Dene an increment by using Eq. (13) as Uk = Uk U(k1) . By minimizing w with respect to u(k1) , we obtain the optimal control increment as s,g s,g Uk , | Ui,k | uk max s,g u(k1) = , sgn( U s,g ) us,g , | U | > us,g i,k k k max k max
s,g s,g s,g

(17)

(18)

where uk max denotes the physically allowable maximum rate of change of the swash plate and rear gate controls over one sample interval. The top branch of the solution matches the range limited optimal control and the lower branch is the rate saturated control. By combining Eqs. (10) and (18), we obtain the optimal control under both range and rate saturation limits. More discussions of such optimal control problems can be found in Kobs and Sun (1997). 4.4. A discussion The preceding optimal control solutions are a function of the reference input and the actual output of the system. Given the hardware limitations, a proper choice of the reference input will keep the control less saturated. How to specify the proper reference is another technical issue not addressed in the paper. Upon nishing the controller design,

Fig. 6. Time history of the mass remaining in the tank during a constant discharge rate spreading. Dashed lines in both gures indicate the desired discharge when the tractor speed is constant. (a) Unltered weight readings from the sensor. (b) Low-pass ltered weight signal.

M. Krishnan et al. / Computers and Electronics in Agriculture 52 (2006) 110

we should also point out the factors that affect the real-time performance of the system. These include the delay in actuation and the nite sample time. The delay can make the control saturation worse. Future studies will examine the effect of these factors. 5. Experimental results Many tests have been done to validate the theoretical development of this work. This section presents the results of one typical spreading experiment. More results and discussions can be found in Krishnan (1999). Let DA denotes the required mass per unit area (kg/m2 ). The spreading width of the machine is 15 m. A relationship between the discharge rate Dt per unit time (kg/s), the speed of the tractor v (kph) and DA can be found as Dt = 4.167 v DA (kg/s). (19)

Since the discharge rate is constant when the tractor speed is constant, the material remaining in the tank is a linearly decreasing function of time. Fig. 6 shows the time history of the mass remaining in the tank during a constant discharge

Fig. 7. Time history of the swash plate and the rear gate opening during a constant discharge density spreading experiment.

Fig. 8. Measured discharge rate obtained by differentiating the weight signal from the constant discharge density spreading experiment.

M. Krishnan et al. / Computers and Electronics in Agriculture 52 (2006) 110

Fig. 9. Discharge density per unit area averaged over 30 s from the constant discharge density spreading experiment. The setpoint is 0.783 kg/m2 .

rate test. The actual measurement is in good agreement with the reference input. Note that there is signicant noise in the measurement due to vehicle dynamics and electronic disturbances. The low pass digital lter designed for the weight sensor is quite effective in reducing measurement noise. Fig. 7 shows the time history of the rear gate opening and the swash plate angle during a constant discharge density experiment with DA = 0.783 kg/m2 . On average, the tractor speed is 3.2 kph, which is 0.894 m/s. Since the lateral spreading width is 15 m, the average area covered in 1 s is 13.41 m2 . Fig. 8 shows the discharge rate obtained from the weight sensor. The fast oscillations in the discharge rate are due to differentiation of noisy data. Fig. 9 shows the averaged mass per unit area over 30 s. The system tracks the setpoint of 0.783 kg/m2 with a uctuating error partly due to the oscillations in the discharge rate. 6. Conclusions We have presented a general modeling and control approach for precision agricultural applications by using a New Holland spreader as an example. The numerical inputoutput modeling approach can handle a wide range of variations in manure materials and the complicated nonlinear dynamics of the machine. The adaptive self-tuning optimal control algorithm can cope with various hardware limits. The theoretical development has been validated by extensive experimental results. The present approach provides a promising methodology for automating machines for precision agricultural applications. Acknowledgements The authors would like to acknowledge the support from the Delaware Research Partnership program and New Holland North America. Many individuals of New Holland North America have contributed signicantly to the success of the project. The authors are deeply indebted to Walter V. Pype, Richard K. Adams, Shaun A. Seymour, James R. Day, and John G. Berger for all the help and support. References
Billings, S.A., 1986. A predicition-error and stepwise-regression estimation algorithm for non-linear systems. Int. J. Control 44, 803822. Diaz, H., Desrochers, A.A., 1988. Modelling of nonlinear discrete-time systems from inputoutput data. Automatica 24, 629641. Haykin, S., 1991. Adaptive Filter Theory. Prentice Hall, New York. Kobs, T., Sun, J.Q., 1997. A nonlinear variable stiffness feedback control with tuning range and rate saturation. J. Sound Vib. 205 (2), 243249. Krishnan, M., 1999. Non-linear adaptive control of precision farming machines. MS Thesis. University of Delaware. Landry, H., Lague, C., Roberge, M., 2004. Physical and rheological properties of manure products. Appl. Eng. Agric. 20 (3), 277288. Landry, H., Piron, E., Agnew, J.M., Lague, C., Roberge, M., 2005. Performances of conveying systems for manure spreaders and effects of Hopper geometry on output ow. Appl. Eng. Agric. 21 (2), 159166. Lewis, F.L., Syrmos, V.L., 1995. Optimal Control. John Wiley and Sons, Inc., New York. Ljung, L., 1987. System IdenticationTheory for the User. Prentice Hall, Englewood Cliffs, New Jersey.

10

M. Krishnan et al. / Computers and Electronics in Agriculture 52 (2006) 110

Malgeryd, J., 1994. Manure characterization. Int. Agrophys. 8, 93101. Malgeryd, J., Wetterberg, C., 1996. Physical properties of solid and liquid manures and their effects on the performance of spreading machines. J. Agric. Eng. Res. 64 (4), 289298. Munack, A., Buning, E., Speckmann, H., 2001. A high-performance control system for spreading liquid manure. Control Eng. Pract. 9, 387391. Slotine, J.-J.E., Li, W., 1991. Applied Nonlinear Control. Prentice-Hall, Inc., Englewood Cliffs, New Jersey. Straub, R., Holmes, B., Silbernagel, C., 1998. Computer controlled manure spreader. Technical Report, College of Agricultural and Life Sciences, University of Wisconsin-Madison. Widrow, B., Stearns, S.D., 1985. Adaptive Signal Processing. Prentice Hall, Englewood Cliffs, New Jersey.

S-ar putea să vă placă și