Pressure control of a mobile spraying system

This paper presents an automatic control system aimed at regulating the output pressure of a spraying system mounted on a mobile platform for fumigation tasks in spite of changes in the vehicle velocity; that is, the pressure set points are calculated based on the actual velocity of the vehicle at each sampling time and are then used in a feedback loop for pressure control purposes. The paper focuses on the dynamic modelling of the spraying system based on the reaction curve method (analysis of the response to open loop steps) and the development and test of several control strategies to achieve the desired pressure profile. One of these approaches, the gain scheduling controller, has demonstrated its ability to cope with the changing dynamics of the system by modifying (adapting) the controller parameters in different operating conditions.


Introduction
Most of the phytosanitary applications in greenhouses in Almería (South-East of Spain) are performed using traditional methods nowadays: a worker carries on a spray gun joined to a tank containing the chemical products that have to be applied to the crop, usually producing a non homogenous deposition on both faces of the leaves.Furthermore, the worker exposure to these products is dangerous for his health, this technique being a source of very important environmental and health risks.The newer automation and robotics techniques and technologies may help to im-prove and optimize the effectiveness of the phytosanitary applications, but requiring more power and heavier systems.
The problem of automatic application of phytosanitary products has been accounted for by different authors.An autonomous robot for spraying tasks in greenhouses was reported by Mandow et al. (1995), being this work oriented to solve the navigation problem into a greenhouse using a commercial spraying system.Adams et al. (2003) developed an inductive autoguidance system for spraying with constant pressure, but the proposed system is very expensive to use in the greenhouses of the Southeast of Spain because an auxiliary installation to guide the vehicle is required.Other application for applying phytosanitary products to trees was developed by Moltó et al. (2000), where an automatic machine was used for spraying carried on a autoguidance tractor.In Escolá et al. (2002) and

Resumen
Control de la presión de un sistema móvil de pulverización Se ha desarrollado un sistema de control automático para regular la presión de salida de un sistema de fumigación instalado sobre una plataforma móvil en función de cambios en la velocidad del vehículo; esto es, las consignas de presión se calculan en función de la velocidad del vehículo en cada instante y se utilizan en un lazo de control por realimentación.El trabajo se centró en el modelado del sistema de fumigación utilizando el método de la curva de reacción (análisis de la respuesta a escalones en bucle abierto) y en el estudio y ensayo de diferentes estrategias de control.Entre éstas destaca la estrategia de control con ajuste por tabla, que permite modificar o adaptar los parámetros del controlador en función de los cambios en la dinámica del proceso que tienen lugar cuando se cambia de punto de operación.
Palabras clave: aplicación fitosanitaria, robot autónomo, invernadero, control con ajuste por tabla.Moltó et al. (2001) ultrasonic sensors are used to regulate the pressure applied to the trees based on the actual leaves mass.The works by Mandow and Adams (and coworkers) used constant pressure spraying systems, while those of Escolá and Moltó (and coworkers) implemented a variable pressure system, but keeping constant the vehicle speed.
A project for designing an autonomous system to solve these problems is being developed in the University of Almería at present.The main objective of this project is the development of a mobile robot based on a differential mechanism carrying on a spraying system (Fig. 1a) composed by vertical bars with several nozzles, an on/off electrovalve to activate the spraying, a proportional electrovalve to regulate the output pressure and a pressure sensor to close the control loop as is shown in Figure 1b.The first stage of the project has as main objective the development of a prototype to allow the spraying of a certain volume of chemical products by hectare controlling the different variables that affect this system.The system is composed by a teleoperated platform without direction control designed only to test the spraying system.The pressure has been selected as the controlled signal aimed at keeping the spraying conditions at constant values (mainly the drop size).The reference value of the pressure is calculated based on the mobile robot speed and the volume of pesticide to apply, where the pressure working range is between 5 and 15 bar.This control is performed manually at present and it is neccesary to find a solution to perform this task in an automatic way.
A first approach to solve this problem would be to control the spraying system pressure in spite of changes in the actual vehicle speed and the required volume to apply.Another interesting feature of this pur-pose, that distinguishes it from the mentioned works, is that it uses modelling and control techniques widely accepted in the process industry (Åström and Hagglund, 1995;Rodríguez and Berenguel, 2002) to control the spraying system, allowing that these controllers are able to cope with the changing dynamics of the system by modifying (adapting) the controller parameters in different operating conditions.

Material and Methods
The first prototype developed consists of a mobile platform driven by a 2.2 (kW) electric engine joined to an endless-screw reducer and without direction control (this will be performed in next stages of the project according with the design shown in Figure 1a).This platform carries on the spraying system and can reach a maximum velocity of 2.9 m s -1 (Sánchez-Hermosilla et al., 2003).The tests and results presented in this paper have been performed using the first prototype shown in Figure 2.
To apply a certain volume of chemical products according to the system variables, the following equation (Weisser and Koch, 2002) was used: (1) where V(l ha -1 ) is the product volume to apply, q i (l min -1 ) is the flow of each nozzle, n is the number of nozzles, v (m s -1 ) is the advance linear velocity of the platform and S l (m) is the distance between crop lines.The pressure is controlled instead of the flow (both are directly related) because better spraying conditions can be obtained (mainly regarding the drop size).This is acceptable if the maximum difference between the  -EN 12761-3, 2002).Moreover, pressure sensors have better accuracy when compared to flow sensors of similar cost.The pressure signal is very noisy with oscillations between ± 0.5 bar, as it is shown in Figure 3, where the real response of the pressure with valve opening steps of ± 10% is presented.The noise source is the membrane pump, that produces continuous pulses in the flow and thus in the pressure, which can lead to undesired behaviour of a feedback control system based on this signal and so, a software low-pass filter has been designed to attenuate this effect, obtaining the filtered signal superposed to the real one in Figure 3.
In order to design a control system it is necessary to model the plant obtaining its associated parameters.As is shown in Figure 3b, the pressure response to a step input in the valve aperture can be approximated by a first order system with delay.So, it can be modelled using the following transfer function , where k is the static gain, which is the quotient between the change in the output amplitude in steady state and the input step amplitude, t r is the delay time, or time lapse during which the output of the system does not react after the step is produced in the input and τ is the time constant, that is the time elapsed since the instant in which the output starts to evolve after the delay to that in which it reaches the 63% of its new steady state value.
Once the model structure is defined, the next step is to choose the correct value for its parameters.The reaction curve method has been used for identifying these parameters (Åström and Wittenmark, 1995; Ro- Spraying pressure control 183  , 2002).This method consists in applying a step input to the process and to record the output in order to obtain the model parameters, as it is shown in Figure 4. Once a model is available, the next step is the design of the controller.The well-known PID [Proportional, Integral and Derivative (Åström and Hagglund, 1995)] algorithm can be used to control this kind of system considering as a first approximation the linear model of the plant and including its nonlinear behaviour afterwards.The PID controller is used widespread.It is composed by a proportional controller ac-ting on the tracking error plus an integral action to eliminate steady-state errors plus a derivative action to reduce reaction times.The PID controllers are represented by the following equation: (2) where K p is the proportional gain (multiplies the error between the set point and the output of the system), T i is the integral time, acting on the error integral (1/T i is known as repetitions per minute, that indicates the number of times that the integral action repeats the effect of the proportional action), T d is the derivative time, acting on the error derivative (it represents the time the derivate action anticipates the proportional action).In this combination: -The proportional action shapes the controlled variable proportionally to the error signal.
-The integral action tries to reduce lasting errors by time, increasing the controller output while the error exists.
-The derivate action anticipates error changes producing fast controller reactions to changing errors, thus increasing the stability of the system.
PID controllers can also be used within a gain scheduling strategy, when the system dynamics change with the operating conditions (nonlinear behaviour).This control algorithm allows modifying the controller performance when system dynamics change.It is sometimes possible to find auxiliary variables that correlate well with the changes in process dynamics and it is then possible to reduce the effects of system parameter variations simply by changing the parameters of the controller as functions of the auxiliary variables (Åström and Wittenmark, 1995).This control strategy is used for developing nonlinear control systems consisting on individual (possibly linear) controllers for each working point, existing different strategies to decide when and how the control law has to be changed depending on the operating Figure 4. Reaction curve method used to identify the model parameters of a first order system with delay as is the case of the system presented in this paper.This kind of system is described by the transfer functions G(s) whose characteristic parameters are the delay time (t r ), the static gain (k) and the time constant (τ).conditions.In the system considered in this paper, the proportional electrovalve is a fast and open loop stable system and the auxiliary variable used has been the value of the set point (desired pressure conditions, Figure 5), because in nominal operation (see Results) the changes in this signal are not abrupt (only ramp changes are performed).At each working point, the first approach to tune the controllers and obtain the controller parameters to feed the gain scheduling algorithm has been the open loop Ziegler-Nichols method (Åström and Wittenmark, 1995;Rodríguez and Berenguel, 2002), that allows to obtain the PID parameters based on the system parameters obtained by the reaction curve method (k, τ, t r ) using empirical relations shown in Table 1.

System modelling
Several experiences in open loop have been performed to obtain the dynamic model of the proportional electrovalve using different amplitude opening steps (5% and 10%) over the same operating points.The analysis of the results shows that the output pressure behaviour changes when different valve amplitude steps are produced around the same working point, and also when the same valve opening steps are produced in several operating points as can be seen in Table 2 (representative results are shown in Figure 6), confirming the nonlinear characteristics of the system.In a first approach, the system was modelled as a first order dynamical system with delay with fixed parameters obtained as the mean of the different measured ones in several operating points, using the reaction curve method (Figure 6 shows both the filtered real and model responses).Acceptable results can be obtained using a fixed parameter model for all operating points, but if more efficient responses are required, the changing dynamics of the system have to be taken into account, as it is commented in the following sections.Furthermore, the analysis of the proportional electrovalve behaviour shows the following set of nonlinear characteristics that affect the control of the outlet pressure: -Saturation.The opening range of the proportional electrovalve is between 0 and 100% (15-5 bar).
-Slew rate.The opening and closing of the proportional electrovalve are performed on a time-proportioning basis (in order to modify the valve position a fixed voltage must be kept constant during a determined time interval).This constraint is very important since the valve takes some (variable) time to reach the desired position, that can be higher than the sampling time used for control purposes, thus leading to errors in the controller states mainly if the real valve opening is not fed into the control block (a new signal can be sent to the actuator before the previous action is finished).
-Hysteresis.As it is usual in the commercial valves, the opening and closing responses are different presenting an hysteresis behaviour as it is shown in Figure 7.
-Output resolution, as it has been commented above, the % of the valve opening is related to the time during which a voltage is applied and there exists a minimum time -dead-zone of about 0.2 seconds (calculated experimentally)-to produce a minimum valve aperture change.In order to calculate it, several experiences have been performed where a ramp signal was used as input to the system (input signal proportional to the elapsed time from the beginning of the test).
Once the system has been characterized, several control strategies have been tested under simulation to improve tracking performance.

Individual PI Control
The first strategy selected has been a fixed parameters PI controller.A derivative action has not been used because this is not recommended when working with noisy signals, that could be amplified.So, as the filtered pressure signal is also noisy, it has been decided not to use this term.The controller parameters have been calculated using the open loop Ziegler-Nichols method (second row of Table 1).The obtained results show a very fast response in the pressure (always limited by the opening and closing time of the valve) but with certain oscillations characteristic of the tuning method used, as it is shown in Figure 8a.Once a first set of controller parameters has been obtained using this tuning method, a detuning is performed to obtain overdamped responses, as can be seen in Figure 8b, at the cost of doing the system response 1.5 seconds slower.If the output resolution constraint is taken into account (since it is impossible to produce a valve increment lower than the 1%), the steady state error cannot be eliminated in all working points, but the results obtained are acceptable with steady-state errors lower than 1% (see Fig. 9).

Independent PI controllers for opening and closing
The previous controllers use a model with f ixed parameters obtained during the modelling phase.It has been observed in Figure 3a that the pressure output has different dynamics for valve opening and closing due to the nonlinearities described in the previous section.As a second approach, the control can be performed designing two fixed PI controllers, one to account for valve openings and the other for valve closings (Table 2).Each PI controller can be obtained using the open loop Ziegler-Nichols technique with different first order models with delay for opening and closing actions and then detuning the obtained controllers.The results of this strategy are shown in Figures 10a and  10b, where it can be seen how similar behaviour has been obtained both for opening and closing valve steps, and the typical effect of valve resolution in combination with integral action.
The use of two different controllers allows improving the results but at the cost of introducing a disturbance in the control loop each time the controller is changed.In order to avoid this problem the bumpless transfer technique has been subsequently used, which consists in adapting the signal of the actual controller to the signal of the controller to change, instead of changing the signals suddenly.The jump from a signal to another one is performed using a ramp profile.

Gain scheduling control
Another step in the development of pressure control algorithms is to account for the different dynamics present at different operating conditions, for instance under a gain scheduling control approach.As has been mentioned, this technique allows changing the controller parameters according to the operating conditions.Four representative dynamic ranges have been considered (two for valve opening and two for valve closing): approximately between 15 and 7 bars (0%-40%) and between 7 and 5 bars (40%-100%) in both cases.These dynamics have been obtained using the mean of the different experiences in the corresponding operating point.The system and controller parameters for these operating points are shown in Table 3.This strategy has been implemented in the developed prototype and representative results are shown in Figure 11.As can be seen, the speed of response of the closed-loop system is similar (slightly faster) to that of the system in open loop.This is a common feature of this kind of fast systems, as faster closed-loop responses could lead the actuators to saturation and a loss of system' controllability.The main advantages of using feedback in this kind of applications is to compensate for disturbances affecting the system output (such as soil irregularities) and unmodelled dynamics (mainly when the controllers are designed based on a simplified system model, as is the case when using the reaction curve method).Nonminimum-phase behaviour at the beginning of each step change (inverse transient response in the measured pressure as a consequence of the layout of the spraying system) is negligible, but could even be avoided detuning the controller parameters or even using more complex dynamical models of the system.

Linking the control system with the mobile robot
The final control system will be divided into two steps shown in Figure 12b.In the first one, the pressure reference is calculated based on the vehicle speed and the desired volume to spray.The second phase, which has been developed in this paper, consists in performing the necessary actions to control the pressure in order to reach the desired set point.The solid line in Figure 12a shows the pressure references calculated in the first stage.When the robot starts to move or to brake the pressure must go up or down respectively, and while the robot speed remains constant the pressure set point also does.The simulation experiences shown in Figure 12a has been performed using the gain scheduling controller where again, the effect of the integral action in combination with valve resolution produces small oscillations around the set point, but this behaviour is accepted in this kind of application.Notice that as the pressure set points are calculated based on the actual value of the vehicle speed, if this suffers from sudden changes caused by soil irregularities, oscillations may occur in the pressure references.To avoid this fact, the value of the vehicle velocity used for pressure set point calculation can be filtered or even the velocity reference can be used instead of the real value of the velocity if the tracking error remains within a desired range.

Discussion
As has been pointed out in the introduction, one feature of the developed work is that it faces the problem of phytosanitary applications within a general control systems theory framework, using modelling and control techniques widely accepted in the process industry (Åström and Hagglund, 1995;Rodríguez and Berenguel, 2002) to control the spraying system.Thus, in the first stage of this work the valve position-pressure model of the system has been obtained detecting several nonlinear characteristics, the slew rate behaviour being the most representative because it constrains the speed of response of the system.Different control strategies have been studied aimed at achieving desired pressure tracking performance, from the use of a f ixed parameter PI controller, two different PI controllers for opening and closing and a gain scheduling control approach to account for the nonlinear characteristics of the system.This last strategy has been tested introducing typical references depending on the robot speed and the total volume to spray and preliminary simulation results have been included in the paper.
Although the steady regime error is acceptable for this type of applications (smaller than a 5% of mean in the different experiences performed), some improvements are now being tested in two ways: new control strategies are being designed like adaptive and predictive controllers; on the other hand, the use of other control valve faster than the actual one are being analysed for the next prototype.The main objective of these improvements is the reduction of the oscillatory behaviour around the set points and the increase of regulation speed.
The previous applications of mobile phytosanitary applications use both constant and variable pressure systems.The objective of the Aurora robot reported by Mandow et al. (1995) was to study and demonstrate the autonomous navigation capabilities of the robot in a greenhouse using a constant-pressure spraying system.Adams et al. (2003) and Moltó et al. (2000) also used constant pressure for spraying, where in this last work an automatic machine was used for spraying, trying to keep constant the distance to the tree canopy to perform a uniform treatment.Unlike the above applications, where the pressure is constant, in Escolá et al. (2002) and Moltó et al. (2001) ultrasonic sensors are used to regulate the pressure applied to the trees based on the actual leaves mass.Neither of the mentioned works copes with the problem of controlling the spraying system pressure in spite of changes in the actual vehicle speed and the required volume to apply.A spraying system working with a constant pressure is not optimal because it is impossible to obtain a constant speed in the application of the phytosanitary products.If the process is performed manually, there are a lot of factors affecting the performance of the worker (high temperature and humidity, fatigue, etc.).On the other hand, if a mobile platform is used to carry on the spraying system, there are some circumstances where it is impossible to maintain a constant speed due to the irregularities of the soil, the different slopes of the ground or the movements in the turns between the crop lines.Therefore, the best option is to work with a variable speed and therefore it is necessary to spray using a variable pressure system.This system presents some advantages like the improvement of the quality of the process, because the product sprayed over each plant is the optimal based on the velocity of the platform.Furthermore, it produces a saving of the phytosanitary products because, at each moment, the optimal quantity is sprayed, reducing the environmental impact and pollution as the volume sprayed to the air is minimised.
The future works will include the acquisition of a faster electrovalve to limit some nolinear characteristics, the modelling of the resulting system and the tuning of the controllers to cope with the systems new dynamics will be performed again.Furthermore, other model-based control algorithms like predictive control will be tested to compare the achieved performance with that of the techniques described in this paper.On the other hand, these new controllers allow the inclusion of economic criteria to obtain the control law and thus, it would be possible to save phytosanitary pro-duct and to decrease costs associated to greenhouse crop production.

Figure 1 .
Figure 1.Mobile robot with spraying system: a) the second prototype and b) the spraying system used to control the output pressure.

Figure 2 .Figure 3 .
Figure 2. First prototype of the mobile platform used in the experiences reported in this paper.The platform carries on the spraying system shown in Figure 1b.

Figure 5 .
Figure5.Gain scheduling strategy.This control strategy allows to adjust the controller parameters according to the actual operating point.

Figure 6 .
Figure 6.Comparison between the model and the real system after two step changes of 10% in the proportional electrovalve aperture.

Figure 7 .Figure 8 .
Figure 7. Pressure outputs for opening and closing of the proportional electrovalve.Hysteresis phenomenon.

Figure 9 .Figure 10 .
Figure9.PI control with resolution constraint: it can be observed that if the resolution constraint is taken into account the error is not zero.The grey line is the set-point and the black line is the simulated output pressure of the system.

Figure 11 .
Figure 11.Results of a real test where the gain scheduling control has been implemented.

Figure 12 .
Figure12.The final control system and typical set point profile.a) Simulation test where the set point is calculated considering the vehicle speed.The grey line is the set-point and the black line is the simulated output pressure of the system.b) Full spraying control system taking into account the velocity and volume.

Table 1 .
Open loop Ziegler-Nichols rules, used to tune the PID parameters according to the system parameters

Table 2 .
Results of open loop tests using steps of 10%.The table shows the output pressure and the model parameters (k, τ, t r ) at each operation point -Indicates that parameters are impossible to obtain from experimental data.

Table 3 .
Characteristic parameters and gain scheduling controller parameters.The parameters of four controllers are presented, two for opening actions and two for closing actions in different operating points