Graphical Abstract MISSION: Model-predictive In-Season Scheduling of Irrigation Or/and Nitrogen Anupam Bhar,Ratnesh Kumar
←
→
Page content transcription
If your browser does not render page correctly, please read the page content below
1 Graphical Abstract 2 MISSION: Model-predictive In-Season Scheduling of Irrigation Or/and Nitrogen 3 Anupam Bhar,Ratnesh Kumar
4 Highlights 5 MISSION: Model-predictive In-Season Scheduling of Irrigation Or/and Nitrogen 6 Anupam Bhar,Ratnesh Kumar 7 • Development of a Model Predictive Control (MPC) framework for real-time in-season agriculture decision- 8 making. The formulation involves a Mixed Integer Non-Linear Program (MINLP) to schedule both the amounts 9 and days of fertilizer and irrigation for optimum economic return, factoring in current field/plant status, past 10 weather, and future predicted weather. 11 • Selection and integration of RBFOpt as an MINLP solver for the scheduling problem: Unlike traditional MINLP 12 solvers that require an analytical description of the underlying dynamical system, RBFOpt allows interfacing 13 with a simulator such as RZWQM for prediction (an analytical description is not required). 14 • Incorporation of Global Forecast System (GFS) to predict near term weather. The forecasted weather is required 15 by RZWQM to predict the yield at season’s end and evaluating the farm profits (economic return). 16 • Development and implementation of a software framework employing RZWQM agriculture model, an MINLP 17 solver RBFOpt, along with GFS weather forecaster, to implement the proposed MPC framework. The software 18 framework itself is flexible to use any agriculture model, any MINLP solver, and any weather forecaster. 19 • Ability to explore scenarios, e.g., running the MPC every 2nd, 3rd, 5th day and so on. Also, the effect of varying 20 the error level of weather forecast on optimizer performance is evaluated. 21 • A carefully designed objective function that also accounts for the costs of applying the inputs besides the cost 22 of fertilizer and irrigation water. 23 • Results of running the MPC framework on a Greeley, Colorado experimental field for (i) real-time in-season 24 scenario, factoring the practical uncertainty in knowing the future weather, versus (ii) “after-the-fact" scenario 25 as a thought experiment when the entire season weather is known as a thought experiment. Also results are 26 compared with expert knowledge based manual application in the same experimental field.
27 MISSION: Model-predictive In-Season Scheduling of Irrigation 28 Or/and Nitrogen 29 Anupam Bhara,∗ , Ratnesh Kumarb,1 30 a Dept. of Electrical and Computer Engineering, Iowa State University, Ames, Iowa 50011, USA 31 b Dept. of Electrical and Computer Engineering, Iowa State University, Ames, Iowa 50011, USA 32 33 34 ARTICLE INFO ABSTRACT 35 36 Keywords: Agriculture productivity and impact is dependent on fertilization and irrigation decisions. There 37 Irrigation and Fertilizer Scheduling exists a trade off between yield and application cost: Low application can compromise yield, 38 Real-time Agriculture Management while high application may be costly without improving yield, while also polluting the envi- 39 Model Predictive Control ronment. Watering/rainfall compounds fertilizer and water use efficiency: Application of fer- 40 GFS Weather Forecast tilizer during heavy precipitation would leach/wash away the fertilizer, whereas too little water 41 Optimization would cause the fertilizer to not reach the roots at depth. Farmers generally use their experience, 42 RZWQM heuristics and general guidelines to decide the amounts and times of irrigation and fertilizer ap- 43 MINLP plications. For instance, high yielding corn requires per hectare 20 to 25 inches of water and 44 around 150 to 200 Kg N-fertilizer. We propose a novel model-predictive real-time in-season 45 decision-making framework factoring in the current plant and soil conditions, together with the 46 past weather and its future forecast, and prescribe optimized irrigation and fertilization applica- 47 tions, that are revised on a daily basis (accounting for the latest update on weather and field/plant 48 conditions). The recommended amounts are determined by running forward simulation of a 49 calibrated RZWQM agriculture model each day, under different combination scenarios of irri- 50 gation and fertilization amounts, and weather forecast from GFS (Global Forecast System)—a 51 scientifically-accepted forecasting tool that we integrated into our framework. We provide imple- 52 mentation results on data from a Greeley, Colorado experimental field for (i) real-time in-season 53 scenario, factoring the practical uncertainty in knowing the future weather, versus (ii) “after- 54 the-fact" scenario as a thought experiment when the entire season weather is known as a thought 55 experiment. Also results are compared with expert knowledge based manual application in the 56 same experimental field. 57 58 1. Introduction 59 Fertilizer and irrigation application amounts and times are critical for optimized agricultural production, as de- 60 termined in terms of net profit (yield revenue minus cost of fertilizer/water/application). While low fertilizer leads to 61 yield loss, excess fertilizer would cause loss of N through runoff or leaching, causing loss of farm profit and also water 62 pollution plus extra greenhouse gas emissions. Even with correct amount of fertilizer, if water application is too high 63 then leaching and runoff would occur, whereas too little water would impede absorption of N by plant roots. 64 Timing within the development cycle also plays a crucial role affecting growth and yield. One-third of plant N 65 requirements must be met by uptake during the reproductive period, otherwise pollination would be hampered. Further, 66 according to Hanway (1966), majority of N required by Maize is between V8 and VT growth stage and so adequate N 67 during this period is essential for good yield. Also, applying N multiple times, including the time of maximum crop 68 uptake, mitigates the risk of N loss due to a rain event and a subsequent N runoff and leaching. 69 Full benefits of N application can be realized when water is also present in its correct amount. KLT (2004) found 70 that too little moisture would prevent N uptake by plant and excess water will take N away from plant roots, increase 71 chances of plant disease, and disturb oxygen balance near roots. The needed irrigation amount depends on the growth 72 stage of the plant, weather condition, and soil properties, and is especially critical for farming in places where natural 73 precipitation is not enough for crop growth. Maize is more sensitive to water stress during tasseling, silking, and grain 74 filling stages as mentioned by Goyal (2012) and Grant et al. (1989). According to Kranz et al. (2008), plant demand of 75 water is less in initial growth stage because of small leaf area transpiring less water. Water demand increases linearly ∗ Corresponding author abhar@iastate.edu (A. Bhar); rkumar@iastate.edu (R. Kumar) ORCID (s): 0000-0002-0699-1453 (A. Bhar); 0000-0003-3974-5790 (R. Kumar) 1 Fellow AAAS, Fellow IEEE. A. Bhar and R. Kumar: Preprint submitted to Elsevier Page 1 of 18
Environmental Modelling Software 76 and is maximum at tasseling and silking stages. The demand then drops slowly till maturity. Weather conditions like 77 low humidity, high radiation and wind increases evapotranspiration and plant water demand increases. 78 Soil property also affects how irrigation should be done. For instance, sandy soil requires more frequent water 79 application with less quantity each time because sandy soil possess high hydraulic conductivity. Clay soil allows larger 80 irrigation interval because of its higher water holding capacity, as suggested in Muktar and Yigezu (2016). Panda et al. 81 (2004) and Ahuja et al. (2000) have suggested that stress happens when soil water is less than 50 percent of plant 82 water. According to Panda et al. (2004), irrigation could be scheduled at 45 percent maximum allowable depletion 83 of available soil water during non-critical stages of growth of maize in sandy loam soils in order to maximize above 84 ground biomass and water use efficiency. 85 Many guidelines have been prescribed for deciding the input amounts and their timing. In Blackmer (1997), N 86 application rate is specified for the case when all N is applied preplanting, or on the basis of various cropping scenarios 87 (such as continuous corn, corn-soybean rotation, corn-on-manured soil, etc.). Recommendations for farmers who wish 88 to split their N applications between pre-planting and in-season are also prescribed. Soil sample tests are used to 89 measure plant available N pre-planting and in-season when the crop is 6-inches tall, which also play a role in deciding 90 how much N to apply at those times. All these guidelines give a range of input days between which the inputs must be 91 applied. The input amounts are also approximate estimates. There is scope for a more precise application amount and 92 schedule dealing effectively with operational constraints. 93 In this work, we propose a real-time in-season model-predictive control strategy comprising amounts and timing 94 of fertilizer and irrigation applications to maximize farm profit. The model used (RZWQM in our case, but any other 95 model can be used), is calibrated using a scenario from a USDA experimental field in Greeley, Colorado. The model- 96 predictive framework allows run-time updates by design, taking into account the latest conditions (namely, field status 97 like moisture/nutrient content and growth stage, weather forecast, etc.). The maximization of profit is formulated as a 98 Mixed Integer Non-Linear Program (MINLP) wherein some optimization variables are integer and some real valued. 99 The integer variables are constrained to be either 0 or 1 where 0 means no fertilizer or irrigation application on a day 100 and 1 implies their application. The real valued variables, determine the amounts of fertilizer and irrigation for a day, 101 and are constrained to be between 0 and a practical upper bound. While the framework proposed in this work can use 102 any agriculture system model and MINLP solver, we have used RZWQM as the agriculture model and RBFOpt as the 103 MINLP solver. 104 On each day of the growing season, the MINLP solver is run with current field/plant status, past known weather, 105 and forecasted weather for the remaining season. For the latter Global Forecast System (GFS) is integrated within the 106 modeling, predicting, and decision-making framework: The solver calls the GFS and RZWQM for forecasted yield 107 and estimated profits under various possible daily applications. The optimizer outputs are future prescription days and 108 amounts of fertilizer and irrigation for those days. Here only the recommendations of the current day are implemented, 109 and then the entire optimization process is repeated on a next day, by first updating RZWQM with actual past weather, 110 the new field status, and the new future weather forecast (by a call to GFS). There exist prior works in the literature 111 that optimally schedule either the fertilizer or the irrigation, but not both. In this work, we schedule both together since 112 as discussed above both the fertilizer and irrigation affect the crop growth, fertilizer efficiency depends on irrigation 113 level. Our work is also differs from the fertigation scheduling, where fertilizer is applied together with irrigation, i.e., 114 not independent of each other. A brief overview of prior works in irrigation and fertilizer scheduling and management 115 is presented next. 116 1.1. Related Works 117 Irrigation scheduling: Irrigation scheduling is defined as the scientific process of determining and optimizing the 118 amount and timing of water applications in order to meet specific management goals. Taghvaeian et al. (2020); Gu 119 et al. (2020) reviews major approaches to irrigation scheduling based on soil water status (SWS), plant characteris- 120 tics, temperature-time-threshold, water stress, temperature stress, crop ET based, crop/regression model outputs, per- 121 sonal calendar schedule, schedule of water delivery organization, when-neighbors-begin-to-irrigate, etc. SWS-based 122 scheduling is divided into SWS monitoring and soil water balance (SWB) modeling. Jimenez et al. (2020); Abioye et al. 123 (2020) reviews Multi-Agent Systems, Fuzzy Logic and AI based irrigation scheduling schemes. Galioto and Battilani 124 (2021) developed an agro-economic model to plan irrigation interventions to optimize profit. They used AquaCrop 125 model and GAMS MINLP solver. Fang et al. (2017) scheduled irrigation using long-term simulations with RZWQM 126 with limited water supply. Chen et al. (2020) incorporated the DSSAT-CERES-Maize model with a new algorithm for 127 dynamic within-season irrigation scheduling for maize (Zea mays L.) based on trends in daily forecasted yields. If the A. Bhar and R. Kumar: Preprint submitted to Elsevier Page 2 of 18
Environmental Modelling Software 128 number of accumulative decreasing days of forecasted yields exceeds a threshold, irrigation at depth would be done. 129 In it, weather data before forecast dates were observed from local weather stations, while the unknown data between 130 forecast and harvest dates were supplemented by local 50-year continuous weather series in the same periods. Then 131 50 maize yields could be obtained on each forecast day, and the median values were calculated as the prediction on 132 that day. As the growing season advanced, prior years weather data were gradually replaced by actual weather data. 133 Fang et al. (2010) used calibrated RZWQM model to investigate various irrigation strategies for high yield and water 134 use efficiency (WUE). According to Fang et al. (2010), increased amount of irrigation during dry season increases 135 efficiency, whereas WUE is less sensitive in wet season. Accordingly, pre-season irrigation for wheat should be post- 136 poned to the most sensitive growth stage (stem extension) for higher yield and WUE. Navarro-Hellín et al. (2016) 137 proposed smart irrigation decision support system (SIDSS). SIDSS senses soil water content, soil water potential, soil 138 temperature, and meteorological variables. The decision-making component uses two machine learning techniques, 139 namely, Partial Least Squares Regression and Adaptive Neuro Fuzzy Inference Systems. Giusti and Marsili-Libelli 140 (2015) proposed a fuzzy decision support system (FDSS). If predicted soil moisture is less than a threshold, irrigation 141 activity is planned by Fuzzy C-Means algorithm. The decision support system of Oad et al. (2009) estimates water 142 shortage by ET based analysis, and applies that amount. Viani et al. (2017) presented a decision support system for the 143 optimized management of the irrigation based on wireless sensor and actuation network technology and the fuzzy logic 144 theory where farmers’ experience and the irrigation best practices were modeled through fuzzy rule sets. CropIrri DSS 145 (Zhang and Feng (2009)) gives four irrigation schedule: Non-limiting, Water saving, Irrigation with experience, and 146 Advanced. MODERATO (Bergez et al. (2001)) decision tool uses two boolean condition that depends on development 147 stage and soil water availability. The details of the rules are inputted using a graphical user interface. Other irrigation 148 decision systems include HydroLOGIC (Richards et al. (2008)) and PlanteInfo (Thysen and Jensen (2004)). There 149 have also been advances in coupling crop models to optimization algorithms in order to identify irrigation schedules 150 that optimize profit, water productivity, or yield (Linker and Kisekka, 2017). Thorp et al. (2010) applied data assimi- 151 lation of remotely sensed leaf area index to improve the ability of the CSM-CROPSIMCERES-Wheat model to predict 152 yield and etc. Mwiya et al. (2020) used AquaCrop model and non-dominated sorting genetic algorithm in a simula- 153 tion–optimization framework for irrigation scheduling. The multi-objective optimization considered risk minimization 154 apart from maximization of net benefits and water use efficiency. It uses probabilistic seasonal weather forecast genera- 155 tor. Linker (2020) presented another model-based optimization scheme for allocation of cropping areas and water. The 156 average weather of the 10 previous years was used in lieu of the forecasts. Lecina (2016) is another simulation model 157 based programmable profit-oriented irrigation scheduling strategy. It is based on a simplified soil water balance (Allen 158 et al., 1998), and dynamically adapts irrigation scheduling to real-time meteorological conditions. Linker et al. (2016) 159 uses AquaCrop model and TOMLAB optimization library to derive concave functions that describe the highest yield 160 achievable under a given water budget. Cabelguenne et al. (1997) used EPIC-PHASE model for real time irrigation 161 management based on model predictions every 5 days. Saleem et al. (2013) developed a Model Predictive Control 162 framework for real-time irrigation scheduling using a simple root zone soil moisture model. 163 Fertilizer scheduling: Djebou et al. (2020) showed that with no pre-planting N application, N leaching was re- 164 duced by up to 17% with no significant impact on corn yield. Heilman et al. (2006) used database of best available 165 observed data and expert opinion. Fang et al. (2008) conducted 2 yr field experiment with four N treatments (0, 100, 166 200, and 300 kg N ha-1 per crop) and showed that crop yield did not increase after 200 kg N ℎ −1 per crop appli- 167 cation rate. Thorp et al. (2008b) developed a DSS called Apollo based on DSSAT. It considered spatial variation in 168 field and analyzed N prescription and population to maximize net return or achieve desired N loss. Jamieson et al. 169 (2006) used a model to simulate potato growth, anticipate future N requirement, and schedule N applications to meet 170 this requirement while minimizing the possibility of leaching. It used long term mean data from the nearest weather 171 station to run the model and predict crop N requirements and schedule N fertilization. This was then updated with 172 actual fertilizer application and weather data throughout the growth season to obtain updated N schedules. Choudhary 173 and Prabhu (2014) showed splitting N application gives better NUE than applying in one go. Thornton and MacRobert 174 (1994) proposed model based decision support. It assumed that fertilizer could be applied every 10 days starting from 175 planting to keep optimization search space manageable, and used hill-climbing (method of conjugate directions) and 176 random search technique for optimization. Works by Marouelli et al. (2014); Thind et al. (2018) includes field exper- 177 iments with different fertilizer rates and timing, and comparing the efficiencies. Hochmuth (1992) reported fertilizer 178 management guidelines for drip-irrigated vegetables in Florida. It recommended applying fertilizer beginning early 179 in the crop cycle with small amounts, then increasing the rate as the crop growth rate and nutrient demand increased, 180 and upon reaching maturity, nutrient applications can level off and even decrease slightly toward the end of the crop A. Bhar and R. Kumar: Preprint submitted to Elsevier Page 3 of 18
Environmental Modelling Software 181 season. Field experiments by Locascio et al. (1997) studied Nitrogen and Potassium application scheduling effects on 182 drip-irrigated tomato. Bai and Gao (2021) combined DSSAT model and genetic algorithm to schedule fertilizer appli- 183 cation under full drip irrigation. Liu et al. (2020) performed field experiments on rice cultivars. According to them, 184 topdressing at the initial stage of flag-leaf extension can significantly increase grain yield. Bussi et al. (1991) studied 185 effects of different amounts and timing of fertilizer in peach orchards under trickle irrigation. In Zhang et al. (2021), 186 a framework combining analytical hierarchy (AHP)/modified AHP methods (MAHP) and metaheuristic optimization 187 techniques was suggested to find the best nitrogen application rate, considering regional capacities and requirements. 188 Hu et al. (2020), through field experiment, studied three N management practices. Jones and Olson-Rutz (2011) pro- 189 vided general guidelines for fertilizer management to minimize N leaching. In works by Feibert et al. (1998); Armson 190 (1963); Fox et al. (1986); Scharf et al. (2002); Rozas et al. (2004), field experiments were done with different fertilizer 191 rates and schedules on different crops. Note that with the availability of high clearance equipment, fertilizers can now 192 be applied later in the growing season as well. This helps distribute the work away from busy planting season, avoids 193 unfavorable field condition to operate the equipment, and reduces in-season fertilizer loss. Farmers though may fear 194 risk of yield loss in late fertilizer application if environment becomes very different than predicted. 195 Fertigation scheduling: Fertigation is combined application of fertilizer and water. Singandhupe et al. (2003); 196 Sandal and Kapoor (2015) studied benefits of drip irrigation in improving water and fertilizer use efficiency and showed 197 application of nitrogen through the drip irrigation in ten equal splits at 8-days interval saved 20–40% nitrogen as 198 compared to the furrow irrigation when nitrogen was applied in two equal splits. Feinerman and Falkovitz (1997) 199 developed and applied a mathematical model for determining the economically optimal scheduling of fertilization and 200 irrigation (fertigation) that maximizes the farmer’s profits. The simple model used three state variables: dry matter, 201 Plant available Nitrogen in root zone, and relative soil moisture content. Field experiments with two fertigation periods 202 were conducted by Ibrahim et al. (2016). It was recommended to irrigate maize crops using a water amount at 1.2 times 203 the crop evapotranspiration every 3 days and applying the recommended fertilizer dose in 80% of the irrigation time. 204 Field experiments by Deshmukh and Hardaha (2014) studied irrigation and fertigation scheduling in drip irrigated 205 papaya. In Vijayakumar et al. (2010), field experiments with three irrigation levels and three fertigation levels were 206 conducted. The goal was to get higher Brinjal yield, water and fertilizer use efficiency and net return. Ravikumar et al. 207 (2011) developed an optimal urea fertigation schedule for sugarcane crop grown under drip irrigation using HYDRUS- 208 2D and growth curve nutrition approach. In Sampathkumar et al. (2010), field experiments were done to study the effect 209 of drip fertigation levels and frequencies on growth and yield of hybrid maize. Fertigation frequency scheduled once 210 in 6 days registered higher grain yield. In Blackmer and Schepers (1995), chlorophyll meter was used to detect plant 211 N deficiencies in maize and fertilizer applied through irrigation water. Deficiency was detected by comparing with a 212 non Nitrogen limiting plot. 213 Co-application of Water and Fertilizer: Co-application means that both water and fertilizer are applied but not 214 necessarily at the same time, which is the most general case, as in our current work. In other words, both irrigation and 215 fertilizer are optimally scheduled as opposed to fixing one and optimizing the other. Nguyen et al. (2017) presented 216 irrigation and fertilizer scheduling problem as decision-tree graph, used Ant Colony Optimization as the optimization 217 engine and used RZWQM for process-based crop growth model. The objective was to maximize economic return 218 for a given water allocation. Very few discrete levels of irrigation and fertilizer amounts and times were used, and 219 also separate decision tree for irrigation and fertilizer were assumed. Cost of trip to apply water and fertilizer was 220 not considered. Shock et al. (2002); Morgan et al. (2009); Rhoads and Stanley Jr (1981); Diez et al. (2000) did field 221 experiments to investigate plant response with different irrigation and fertilizer rates and schedules. Split fertilizer 222 application reduced leaching and wastage but too frequent application is also not advisable. Behera and Panda (2009) 223 field experiments on wheat with four fertilizer and three irrigation treatment were conducted. It was concluded that 224 an irrigation schedule with 40% maximum allowable depletion of available soil water can be maintained during the 225 non-critical growth stage to have high WUE. In Wang et al. (2019), field experiments were conducted to investigate 226 the effects of different drip irrigation frequencies, water amounts and fertilizer rates on the yield, quality, water and 227 fertilizer productivity of potato. In Liu et al. (2019), experiments with varied combinations of water and fertilizer were 228 conducted, based on which a multi-objective quadratic model for supporting use of water and fertilizer was developed, 229 and solved by fuzzy logic programming. Barrett et al. (2018) field-researched determining the optimum nitrogen fertil- 230 izer application rate range, examining the effects of two irrigation strategies: The soil moisture sensor based irrigation 231 treatment performed better than evapotranspiration based irrigation. He et al. (2012) different irrigation and fertil- 232 izer schedules were simulated with calibrated maize model of DSSAT. Since it is impractical to try all combinations 233 of schedule in field experiments, the literature that suggest schedule by conducting field experiments, can only give A. Bhar and R. Kumar: Preprint submitted to Elsevier Page 4 of 18
Environmental Modelling Software 234 approximate guidelines, leaving scope for a more efficient schedule. 235 Apart from scheduling fertilizer and irrigation, there are other approaches to make farming efficient, e.g., crop 236 rotation, tillage, drainage control and cover crops to reduce leaching (Al-Kaisi et al. (2015); Malone et al. (2007b); 237 Ma et al. (2007); Malone et al. (2007a); Li et al. (2008); Thorp et al. (2008a)). Basche et al. (2016) showed winter rye 238 cover crop increased soil water storage over wetter and drier years. According to Garibaldi et al. (2019), ecological 239 intensification aims to increase crop productivity by enhancing biodiversity and associated ecosystem services, while 240 minimizing the use of synthetic inputs and cropland expansion. 241 Our contribution in this work can be summarized as follows. 242 • Development of a Model Predictive Control (MPC) framework for real-time in-season agriculture decision- 243 making. The formulation involves a Mixed Integer Non-Linear Program (MINLP) to schedule both the amounts 244 and days of fertilizer and irrigation for optimum economic return, factoring in current field/plant status, past 245 weather, and future predicted weather. 246 • Selection and integration of RBFOpt as an MINLP solver for the scheduling problem: Unlike traditional MINLP 247 solvers that require an analytical description of the underlying dynamical system, RBFOpt allows interfacing 248 with a simulator such as RZWQM for prediction (an analytical description is not required). 249 • Incorporation of Global Forecast System (GFS) to predict near term weather. The forecasted weather is required 250 by RZWQM to predict the yield at season’s end and evaluating the farm profits (economic return). 251 • Development and implementation of a software framework employing RZWQM agriculture model, an MINLP 252 solver RBFOpt, along with GFS weather forecaster, to implement the proposed MPC framework. The software 253 framework itself is flexible to use any agriculture model, any MINLP solver, and any weather forecaster. 254 • Ability to explore scenarios, e.g., running the MPC every 2nd, 3rd, 5th day and so on. Also, the effect of varying 255 the error level of weather forecast on optimizer performance is evaluated. 256 • A carefully designed objective function that also accounts for the costs of applying the inputs besides the cost 257 of fertilizer and irrigation water. 258 • Results of running the MPC framework on a Greeley, Colorado experimental field for (i) real-time in-season 259 scenario, factoring the practical uncertainty in knowing the future weather, versus (ii) “after-the-fact" scenario 260 as a thought experiment when the entire season weather is known as a thought experiment. Also results are 261 compared with expert knowledge based manual application in the same experimental field. 262 2. Materials and Methods 263 The tools required by our MPC based decision-making framework like RZWQM (model), RBFOpt (MINLP con- 264 straint optimization solver), GFS (Numerical Weather forecaster) are briefly described here. The integration of all 265 these components in MPC framework is described afterwards. 266 2.1. The Agriculture system Model: The Root Zone Water Quality Model (RZWQM) 267 Root Zone Water Quality Model (RZWQM) (Ahuja et al., 2000) is an agriculture system simulator developed and 268 maintained by USDA. It simulates almost all agriculture processes of plant growth and soil bio-physio-chemical inter- 269 actions. The interactions are implementation of coupled differential equations in programming language of Fortran. 270 RZWQM has a graphical user interface as well as a command line interface. The GUI is used to create a scenario of 271 the agriculture setup wherein cultivar of crop and its parameters, daily weather, management inputs, as well as soil 272 characteristics are entered. Some important weather input includes daily temperature, solar radiation, precipitation, 273 and wind speed. Management input includes date and quantity of fertilizer/pesticide/irrigation application, tillage, and 274 harvest. The method of application can also be specified. Some of the important soil parameters required are hydraulic 275 parameters and thermal conductivity. RZWQM simulates vertical variation of soil characteristics by dividing the soil 276 into many layers, with user defined thickness of each layer. The model can accommodate up to ten soil layers, with 277 each layer having its own set of parameters. Once the input variables and parameters are given, RZWQM simulates 278 many output variables in a daily time scale. RZWQM is a point model that simulates one crop at that point. Some of 279 the outputs of RZWQM are soil water, Nitrogen, organic matter content, N losses (to runoff, leaching, denitrification), A. Bhar and R. Kumar: Preprint submitted to Elsevier Page 5 of 18
Environmental Modelling Software 280 plant N uptake, evapotranspiration, water losses (runoff, seepage, drainage/tile flow), soil temperature, plant height, 281 biomass, yield, leaf area index (LAI), phenology. It should be emphasized that RZWQM gives daily outputs for the 282 period for which inputs are given. For instance, to get the daily outputs from May 2008 through Oct 2008, the inputs for 283 that duration of time needs to be given. For a more complete list of RZWQM inputs, outputs and parameters, readers 284 are encouraged to refer Ma et al. (2012a). Figure 1: RZWQM agriculture simulator’s modules 285 Figure 1 shows the different modules of RZWQM in colored boxes. Some relevant parameters for each module 286 are italicized within the boxes. The interdependencies of the modules are shown by colored arrows. For instance, 287 consider the Soil Solution Transport module in bottom left. It provides as output the daily soil moisture content at 288 different depths shown as purple outgoing arrow. The module computations depend on rainfall, irrigation, crop root 289 length and surface water. These inputs are shown as colored incoming arrows. The Soil Solution Transport module 290 uses Richards equation (Van Dam and Feddes, 2000) to calculate moisture content for different days and depths, with 291 plant water uptake and tile drainage acting as sinks. The modified Brook-Corey equations (Brooks, 1965) describe 292 the soil water retention curves. The Green-Ampt equation models infiltration during rainfall or irrigation. Plant water 293 uptake gets restricted by evapotranspiration calculated from Shuttleworth-Wallace potential evapotranspiration (PET) 294 module (Shuttleworth and Wallace, 1985). The Nutrient Cycling module in black outputs the concentration of different 295 form of soil organic matter, Carbon, and mineral Nitrogen. The module in turn responds to various inputs as shown 296 by the incoming arrows. This module divides organic N into five pools, namely, fast and slow residue pools and fast, 297 intermediate, and slow humus pools. Each pool has a fixed C:N ratio, and the microbes transfer and decompose matter 298 among different N pools. The microbes are divided into three pools: aerobic-heterotrophs, anaerobic-heterotrophs, 299 and autotrophs. The module simulates urea hydrolysis, immobilization, mineralization, nitrification/denitrification, 300 ammonia volatilization and microbial level as first or zero order reactions. The Soil ion chemistry module simulates 301 the long-term effects of agriculture management on soil pH and salinity. The module includes cations and anions like 302 H+ , Ca2+ , Mg2+ , Na+ , NH+ 4 , Al3+ ,SO2− 4 , CO2− 3 , OH− , NO− 3 , and Cl− and simulates dissolution and precipitation of 303 partially soluble salts through solubility equations. Adsorption-desorption of cations in solution and on the soil surface 304 are simulated through ion exchange equations. The convective–dispersive heat equation is solved for heat transfer in A. Bhar and R. Kumar: Preprint submitted to Elsevier Page 6 of 18
Environmental Modelling Software 305 soil in the Soil Temperature module. The Crop Growth module simulates above and below ground biomass, yield, 306 leaf area, crop height, phenology, water, and N uptake from soil. Each of these modules’ processes are modeled via 307 coupled differential or difference equations and implemented in Fortran programming language. Readers interested in 308 knowing details of all the RZWQM modules in depth can refer the literatures by Ahuja et al. (2000) and Hanson et al. 309 (1998). 310 In this work, RZWQM scenario is created closely matching a field experiment conducted in USDA LIRF farm 311 in Greeley, Colorado in 2008 by Ma et al. (2012b). We calibrated the parameters of the RZWQM model against the 312 experimental field data in Bhar et al. (2020). In the experimental scenario, maize was planted in May and Harvested in 313 Oct. Fertilization and Irrigation were applied following general the guidelines according of Davis and Westfall (2009) 314 so as not to stress the crop of water or nutrient. Details of the field setup is described by Trout and Bausch (2017). We 315 use the calibrated RZWQM model to get harvestable crop yields under different amounts of fertilizer and irrigation as 316 inputs, as elaborated in the following Sections. 317 2.2. MINLP – Mixed Integer Nonlinear Programming Mixed integer nonlinear programming (MINLP) problem comprises of the class of optimization problems in which some of the decision variables are discrete integers and some are continuous real-valued. The objective function as well as constraints can be nonlinear in the decision variables. Mathematically, MINLP has this general form: min , ( , ) s. t. ( , ) ≤ 0 ( = 1, 2, … ) (1) ∈ ℝ , ∈ ℤ , 318 where f is the objective function (also called the cost function) mapping from ℝ × ℤ to ℝ (ℝ is the set of all Reals, ℤ 319 is set of all integers), p is the number of real constrained variables, q is the number integer constrained variables, ’s are 320 constraint functions, is -dimensional real-valued decision variable, and is -dimensional integer-valued decision 321 variable. In general, or are nonlinear, but if both are linear, then the class of problem is known as MILP (Mixed 322 Integer Linear Programming). MINLP problems can be classified into convex vs. non-convex: If both the objective 323 and constraint functions are convex, then its a convex-MINLP, and otherwise its non-convex. Convex MINLPs are 324 easier to solve than non-convex ones, for the former possess unique global optima. Both classes are NP-hard, and most 325 MINLP solvers employ a combination of solution techniques. 326 Also there are many software packages that solve MINLP. Readers can refer to the review works by Bussieck and 327 Vigerske (2010); Kronqvist et al. (2019); Lastusilta et al. (2007) for a list of MINLP solvers. We have used RBFOpt 328 with Python interface for our proposed MPC platform in this work, but user can plug their own MINLP instead of 329 RBFOpt. Factors that can affect the choice of a solver are interfacing, memory, speed, accuracy, and cost. 330 2.2.1. RBFOpt python package 331 RBFOpt (Costa and Nannicini, 2018; Nannicini, 2021) is an open-source library, available through python inter- 332 face at https://pypi.org/project/rbfopt/, for black-box (also called derivative-free) global optimization of 333 nonconvex MINLP, that we selected and integrated for our work. By Black-box it is meant that the analytical expres- 334 sions for , in equation form 1 are not required, rather the function values can be obtained through a simulation of 335 their software implementation. For this work, computation of involves executing RZWQM to obtain farm profit. 336 There exist other methods apart from RBF for black-box optimization. Rios and Sahinidis (2013) for example reviews 337 algorithm and software implementation of black-box optimization. 338 RBFOpt stands for Radial Basis Function Optimization. Given distinct points in the feasible region of the problem 339 and their function values, RBFOpt uses radial basis functions to interpolate the intermediary points (Gutmann, 2001). 340 RBF thus acts as a surrogate model approximating to help perform the optimization in reasonable time, by evaluating 341 at a smaller number of points and relying on RBF interpolated values at the other points. RBFOpt utilizes solvers of 342 nonlinear programs (NLPs) as well as mixed integer nonlinear programs (MINLPs). By default, RBFOpt uses IPOPT 343 (Interior Point Optimizer) (Wächter and Biegler, 2006) as NLP solver and Bonmin (Basic Open-source Nonlinear 344 Mixed Integer programming) (Bonami and Lee, 2007) as MINLP solver. We have used Couenne (Convex Over and 345 Under Envelopes for Nonlinear Estimation) (Belotti, 2009) as the MINLP solver since it is a global optimizer, as 346 opposed to Bonmin which is only a local optimizer. RBFOpt internally uses Pyomo (Hart et al., 2017) software 347 packages for formulating optimization models which in turn uses AMPL (Fourer et al., 1987) algebraic modeling 348 language to describe large scale optimization and scheduling type problems. RBFOpt has checkpointing mechanism A. Bhar and R. Kumar: Preprint submitted to Elsevier Page 7 of 18
Environmental Modelling Software 349 that saves all intermediate results and states of the optimization in a file. The checkpoint file can be loaded, and the 350 optimization process can be resumed at a later time without loss of information. This feature is helpful for longer 351 simulations. 352 2.2.2. MINLP formulation of optimum fertilizer and irrigation schedule 353 Our objective function in Equation (1) is the farm profit in a cropping season. RBFOpt minimizes an objective 354 function, and hence we negate the profit for being able to maximize it. We define the profit as: profit = unitPrice × yield − fertilizerCost × fertilizerAmount (2) −irrigationCost × irrigationAmount − tripCost × noOfTrips, 355 where profit is measured in $/Ha, yield harvested is in dry weight Kg/ha, unitPrice is selling price of maize in $/Kg, 356 fertilizerAmount is total Nitrogen applied in the growing season in KgN/Ha, fertilizerCost is cost of N in $/Kg, irri- 357 gationAmount is amount of cm of water applied, irrigationCost is cost of irrigation in $/cm, noOfTrips is number of 358 times fertilizer or irrigation are applied, and tripCost is the cost of a trip. This formulation is similar and more general 359 to the profit in previous work by Bhar et al. (2020) with the addition of trip cost. tripCost is discourages frequent input 360 applications and models the reality of cost of machinery, labor, and fuel to apply the inputs. The price of maize, cost 361 of fertilizer and irrigation water are same as in work by (Bhar et al., 2020, Section 2.5). For this work, tripCost is 362 assumed to be $9 per acre ($22per Hectare) according to Stiles and Stark (2016). The above formulation is expanded 363 in Equation (3) to include the effect of application days: ( ) ∑ profit , , , = unitPrice × yieldRZWQM , , , − fertilizercost × ∑end ∑end ( = ) (3) − irrigationCost × = start − tripCost × = start + − , 364 where subscript d denotes day of year (DOY) (e.g., = 126 for 5 ℎ May 2008); start and end denote start and end 365 days of growing season respectively; is a binary variable, with 1(0) denoting fertilizer is(not) applied on day d; 366 is real-valued variable denoting amount of fertilizer N applied on day d, and is constrained between 0 and 72; is 367 a binary variable, with 1(0) denoting irrigation is(not) applied on day d; is amount of irrigation applied on day 368 d, and is constrained between 0 and 6. yieldRZWQM is end of season yield harvest predicted by RZWQM calibrated 369 against the experimental field in Greeley CO; start and end is fixed to 126 and 292 (18 ℎ Oct 2008) respectively, where 370 126 corresponds to 5 ℎ May 2008, around one week prior to planting. The RBFOpt MINLP solver maximizes profit 371 with respect to the decision variables , , and , where the values of these optimization variables specify the 372 days on which to apply along with the amounts to apply on those days. In case both irrigation and fertilizer occur on a 373 same day, the formulation in Equation (3) treats this to be a single trip by way of introducing the final term there. Note 374 yieldRZWQM needs the entire season weather for its computation. For this, our model-predictive MINLP formulation 375 employs the forecasted weather as supplied by GFS. 376 2.3. Weather forecasting: GFS and Prophet 377 For weather forecasting and providing that as input to RZWQM so it can copute yield, we selected and integrated 378 Global Forecast System (GFS) weather forecast model (see https://www.ncei.noaa.gov/products/weather-climate-mo 379 global-forecast and https://www.emc.ncep.noaa.gov/emc/pages/numerical_forecast_systems/gfs. 380 php). GFS is from National Center for Environmental Prediction (NCEP) that generates data for dozens of atmospheric 381 and ground variables, including temperatures, wind speed with direction, and precipitation. It comprises of a global 382 weather model, tied with variational analysis, run by the U.S. National Weather Service (NWS) four times daily, pro- 383 ducing forecasts for up to 16 days in advance on each run. The system couples four separate models (atmosphere, 384 ocean, land/soil, and sea ice) that work together to depict and predict weather conditions. It has a base horizontal 385 resolution of 18 miles between grid points which drops to 44 miles (70 kilometers) between grid points for forecasts 386 greater than a week. Another popular numerical weather prediction model is the European Center for Medium-Range 387 Weather Forecast (abbreviated as the ECMWF model). GFS and ECMWF differ in the complexity of the mathematical 388 equations, approximations made, and the way observations are assimilated. 389 Numerical weather models solve systems of differential equations based on the basic laws of physics, fluid flow, 390 and chemistry. To simulate, the Earth is divided into a 3-dimensional grid (Figure 2), upon which the model equations A. Bhar and R. Kumar: Preprint submitted to Elsevier Page 8 of 18
Environmental Modelling Software 391 are solved and the results obtained for winds, heat, radiation, relative humidity, and surface hydrology within each 392 grid and with interactions with the neighboring ones. There also exist literature that perform weather forecasting using 393 time-series analysis and machine learning, but they lack good forecast for daily precipitation (that being rare events, 394 are not continuously present). Other ways to get forecasted weather data is through API served by private companies. 395 The APIs provide ways to input the geographic location for which forecast is needed; the response is typically a JSON 396 or XML object containing the forecast information of the provided location. Most APIs can provide around two 397 weeks of forecast while some might provide for even a longer period. However, the APIs typically provide forecast 398 from the current day, while the forecasts for a past date cannot be provided. Some of the websites offering API forecast 399 services are metiomatics.com, climacell.co, openweathermap.org, weatherbit.io, accuweather.com, weather2020.com, 400 tomorrow.io, visualcrossing.com, aerisweather.com, weatherstack.com. openweathermap.org is one exception that 401 maintains a historical archive of 16 days forecast from year 2017 onwards. Figure 2: Schematic for numerical weather model like Global Forecasting System Model. [Adapted from https://celebrating200years.noaa.gov/breakthroughs/climate_model/modeling_schematic. html and (Kotamarthi et al., 2021, Chapter 2)] 402 GFS forecasted data is served by NOAA as grib files at https://www.ncei.noaa.gov/has/HAS.FileAppRouter? 403 datasetname=GFSGRB24&subqueryby=STATION&applname=&outdest=FILE. GRIB (GRIdded Binary or Gen- 404 eral Regularly-distributed Information in Binary form) format is commonly used in meteorology to store historical 405 and forecast weather data. GRIB files are a collection of self-contained records of 2D data. For this work, GFS grib 406 files containing 16 days daily global forecast were downloaded from NOAA server for each day in the 2008 growing 407 season. The 16 days forecast for a day is made up of multiple grib files. The grib files were merged using qtVlm 408 (https://www.meltemus.com/index.php/en/) software. qtVlm provides a weather grib viewer where several 409 grib files can be loaded at the same time. The merged grib file (with 16 days forecast) for a day is loaded in OpenCPN 410 software (https://opencpn.org/OpenCPN/info/about.html). OpenCPN is a Chart Plotter and Navigational 411 software program. Once the grib file is loaded, the place of interest (in this work, Greeley, Colorado. USA) is right 412 clicked in the map. Then under Main Menu, Weather table is chosen. This has the 16 days daily forecast. A screen- 413 shot of the OpenCPN’s forecast in weather table is given in Figure 3. Forecasted part of weather inputs needed for 414 RZWQM, namely, wind, rain and temperature are obtained from OpenCPN. 415 RZWQM also requires daily solar radiation and relative humidity as weather inputs. We obtained those from 416 time-series analysis of historical data. Historical weather data for Greeley, Colorado was obtained from CoAgMET at 417 Colorado State University (https://coagmet.colostate.edu/rawdata_form.php). In case of missing data at 418 Greeley, those were filled by data from Kersey weather station. (Kersey is the nearest, 50 miles away, weather station 419 to Greeley. Also a last valid observation was forward filled if both Greeley and Kersey weather station had missing 420 data.) For the purposes of radiation and humidity forecast, we employed Facebook Prophet (https://facebook. 421 github.io/prophet/) and trained it against the Greeley/Kersey data from the year 1993 though the current growing A. Bhar and R. Kumar: Preprint submitted to Elsevier Page 9 of 18
Environmental Modelling Software Figure 3: Screenshot of a portion of forecast for Greeley, CO from 5th Nov 2008. Mainland US is in the background. 422 day of the season in year 2008, using which the 16 days forecast from the current day was obtained. Prophet trains 423 a time series model comprising additive terms with non-linear trends that is fitted with daily/weekly/monthly/yearly 424 seasonality. The fitted time series performs well in case of several years of historical data having strong seasonal 425 effects, and also efficiently handles outliers. Prophet offers both python and R interfaces, and we only used the Python 426 interface. 427 Due to the chaotic nature of the partial differential equations that govern the weather model, it is difficult to obtain 428 reliable results beyond near term of 16 days, as the small errors magnify chaotically. For the forecasts beyond the 429 16 days from the current date, simply the averages of the historical values were used. Climate generators like Cligen 430 (Meyer, 2011) developed by USDA ARS may also be used to forecast long term weather (i.e., beyond 16 days). Cligen 431 is a stochastic weather generator which produces daily estimates of precipitation, temperature, dewpoint, wind, and 432 solar radiation for a single geographic point, using monthly parameters (means, SD’s, skewness, etc.) derived from the 433 historical data. Station parameter files to run Cligen for several thousand U.S. sites are publicly available for download. 434 2.4. Model Predictive Control framework for real-time fertilizer and irrigation recommendation 435 Model Predictive Control (MPC) (Camacho and Alba, 2013; Garcia et al., 1989), developed in the 1960s, is a 436 runtime decision-making approach employing a process model to predict a system’s future response in evaluating 437 alternative decision strategies. A series of control decisions are computed at each decision instant, however only 438 the first computed decision is implemented, upon which the calculation process is repeated at the subsequent control 439 instants, each time with most recent state updates. Within the agricultural domain, MPC has been used in irrigation 440 scheduling to maintain soil moisture at a certain level(Lozoya et al., 2014; Delgoda et al., 2016; McCarthy et al., 2014; 441 Shang et al., 2019), controlled release of fertilizers to reduce fertilizer leaching (Shaviv and Mikkelsen, 1993; Sempeho 442 et al., 2014; Irfan et al., 2018), greenhouse control for efficient energy use (Bersani et al., 2020; Ouammi et al., 2019; 443 Chen et al., 2018; Zou et al., 2010; Ramírez-Arias et al., 2005), canal management (Van Overloop et al., 2010; Fele 444 et al., 2014; Silva et al., 2007), and also navigation/path-planning (Backman et al., 2012, 2010; Kayacan et al., 2014a,b; 445 Kraus et al., 2013; Plessen and Bemporad, 2017; Lenain et al., 2005; Kayacan et al., 2015). Readers may refer (Ding 446 et al., 2018) for recent review on MPC for Agriculture applications. 447 Our MPC approach considers yield-revenue and irrigation/fertilization/trip costs all at the same time for optimal 448 scheduling. Previous works consider only a subset of those, and to the best of our knowledge there is no work on A. Bhar and R. Kumar: Preprint submitted to Elsevier Page 10 of 18
Environmental Modelling Software 449 MPC-based fertilizer only scheduling. Also, most MPC work employ a simplified analytical model for prediction, we 450 however use the full-blown RZWQM for modeling. Another novel feature of our work is the integration of accurate 451 weather prediction models, which is required for RZWQM to predict the yield, and determine the revenue. Figure 4: MPC framework for real-time in-season agriculture inputs scheduling. 452 Our real-time model-predictive approach is depicted in Figure 4 and is described as follows. For every ℎ day d 453 ( = 1, 2, 3, …) beginning from the growing start day and till the end day: 454 1. Generate weather forecast from day d till end day using GFS+Prophet for near-term and historical averages for 455 further longer-term. 456 2. Append the forecasted data from day onwards to the known weather data till day d-1 to obtain the entire season 457 weather for RZWQM; Met files in RZWQM of Figure 4 are updated for this. 458 3. Run RBFOpt solver with the already prescribed inputs till day d-1, while optimizing the inputs from day d 459 onwards to maximize f of Equation (3); for this use RZWQM for yield prediction that it outputs in Overview.out 460 file as shown in Figure 4. 461 4. If = 1, apply amount of fertilizer, and if = 1, apply amount of irrigation, writing these applied 462 values in Rzwqm.dat file as in Figure 4. 463 5. Stop if = , else = + and go back to step 1 above. 464 Note in step 3, RBFOpt makes several calls to RZWQM, with each run for one possible value of decision variables 465 taking around 10 sec each time. Note due to inaccessibility to the internal states of RZWQM, it needs to be run in its 466 entirety for the full season each time (as opposed to from day d). This motivated us to implement our own lean model 467 with access to internal states as described in our work (Bhar et al., 2021) for a faster prototyping if so needed. 468 3. Results and Discussion 469 The MPC framework described above is implemented in Python. RZWQM is called from Python program through 470 system() calls. The program sends updates to RZWQM by making changes to RZWQM.dat file as well as the weather/Met 471 files. The output from RZWQM is read in form of Overview.out file. The simulation experiments were run in Dell 472 Optiplex 9020 desktop computer with Intel Core i7-4770 3.4GHz 8GB RAM. 473 We experimented with two approaches: (i) GFS+Phophet models for near-term vs. historical averages for long- 474 term as described in Section 2.3; and (ii) historical weather data, with added noise whose variance increases over days 475 further into future. So that the addition of increasing-variance Gaussian error does not make some weather values 476 infeasible (e.g., relative humidity exceeding 100 or below 0), we assign certain bounds in generating the synthetic 477 weather data. In practice approach (i) gets to be used; approach (ii) is pursued to see the robustness of the MPC A. Bhar and R. Kumar: Preprint submitted to Elsevier Page 11 of 18
Environmental Modelling Software Table 1 Performance of thought experiment MPC with different run times and gap days. No. of Total Fert. Total Irrig. No. of No. of No. of Gap Time Yield Profit Model Applied Applied trips trips distinct (Days) (Hrs) (Kg/Ha) ($/Ha) Runs (Kg N/Ha) (cm) for Fert. for Irrig. trips 1.2 300 571 82.3 16 26 33 14694 1115 6.0 729 279 43.11 9 11 17 14643 1900 1 27.8 2553 222 44.7 8 15 20 14475 1844 55.6 5140 285.3 43.7 8 12 16 14588 1903 1.2 300 375.6 61.5 13 19 27 14658 1511 6.0 954 238 43.6 9 16 20 14420 1825 2 27.8 3955 243.2 44.2 8 11 14 14459 1957 55.6 7306 247.4 46.4 9 12 16 14645 1934 1.1 300 277.7 44.2 10 10 13 14511 1959 6.0 1981 241 42 6 10 14 14615 1999 4 27.8 5390 229.4 43.4 7 10 11 14650 2075 45.5 8799 221 41.8 5 9 11 14577 2076 1.1 300 232 46 9 10 11 14451 2023 8 27.8 6241 219.2 45.5 5 8 9 14686 2124 38.4 8191 221.5 43 4 9 10 14700 2115 1.1 300 201 38.9 6 7 8 12690 1822 16 27.8 6644 215.7 47.8 3 8 8 14046 2019 33.7 7917 215.7 47.8 3 8 8 14046 2019 1 300 102.1 28.6 2 5 5 7605 1078 32 27.8 7545 102.6 29.7 3 5 5 7619 1075 29.08 7709 102.6 29.7 3 5 5 7619 1075 1 300 59.7 15.1 2 3 3 5990 923 64 25.3 7138 65.2 17.7 2 3 3 6210 947 26 7138 65.2 17.7 2 3 3 6210 947 478 framework in case of the deviation of weather forecast from actuality. For this, we generate three different forecasts 479 from three different levels of error variances, which we refer to it as low SD, medium SD, and high SD, respectively. 480 3.1. Thought experiment with weather is known in advance (applicable only for historical cases) 481 The performance of running MPC is discussed here in after-the-fact scenarios, where the entire season weather is 482 known from its historical record. Such thought experiment provides a baseline for comparison. The optimization days 483 range from DOY 126 to 292 totaling 166 days. Since there are 4 decision variables per day, if all days are considered, 484 the search space becomes 166 x 4 dimensional. To simplify, instead of all days, we consider: (i) every alternate day 485 (1 day gap), (ii) every third day (2 days gap), (iii) every fifth day (4 days gap), etc. as listed in Table 1. Also, RBFOpt 486 offers settings that can constrain it to run over a specified time, where lower run time is expected to give sub-optimal 487 results, while higher run time may become unsuitable for practical application. The column No. of Model Runs shows 488 the number of times RZWQM was run by the MINLP solver within the specified time. Table 1 gives the performance 489 for different run times and gap days. It can be observed that increasing run time beyond 6 hrs did not improve the 490 profit much. Hence for our real-time MPC framework we constrained RBFOpt to run for 6 hrs at each iteration. Also 491 we observed that with 8 days gap, the profit is maximized. This can be attributed to the fact that with less gap days, 492 there are more number of variables, increasing the chances of getting trapped in local optima. We can then conclude 493 that instead of considering all days of growing season as possible candidates for input application, we can consider the 494 frequency of every 8 ℎ to 16 ℎ day. 495 3.2. Real-time with synthetic weather forecast 496 In Table 2, low, mid, and high SD denote the levels of Standard Deviation in error introduced to the actual weather 497 data of year 2008 to generate the forecasted weather data (from a current day till the end day). This Table gives, for A. Bhar and R. Kumar: Preprint submitted to Elsevier Page 12 of 18
Environmental Modelling Software Table 2 Performance of real-time MPC with synthetic weather forecast and varying gap days. No. of Total Fert. Total Irrig. No. of No. of No. of Time Yield Profit Scenario Model Applied Applied trips trips distinct (Hrs) (Kg/Ha) ($/Ha) Runs (Kg N/Ha) (cm) for Fert. for Irrig. trips 1 gap day; low SD 22d 187214 529 64.7 15 18 26 14673 1388 1 gap day; mid SD 22d 174552 416.5 52.8 9 17 23 14701 1613 1 gap day; high SD 22d 169557 394 43 11 12 20 14131 1640 2 gap days; low SD 15d 120319 427 61 10 15 20 14183 1534 2 gap days; mid SD 15d 123193 239 67 8 14 20 14694 1764 2 gap days; high SD 15d 124809 381 52.6 10 14 18 13740 1576 4 gap days; low SD 9d 48879 368 51.6 10 15 18 13956 1632 4 gap days; mid SD 9d 48064 355 40.6 9 10 16 14508 1844 4 gap days; high SD 9d 46713 225 37 10 10 15 13685 1843 Greeley, CO 142.4 46 5 16 19 11424 1361 Table 3 Performance of real-time MPC with GFS weather forecast under 7 gap days. Total Fert. Total Irrig. No. of No. of No. of Yield Profit Longterm forecast Applied Applied trips trips distinct (Kg/Ha) ($/Ha) (Kg N/Ha) (cm) for Fert. for Irrig. trips 15 years average 240.48 54.8 10 13 14 14253 1870 A sample year in history 252.84 63.21 7 8 10 14614 1974 498 different scenarios, the amounts of fertilizer and irrigation water applied, number of trips for irrigation or fertilization, 499 yields and profits. It also gives the profit for the experimental field scenario in Greeley, Colorado. Within real-time 500 decision making scenarios, the effect of weather forecast accuracy on profit can be seen to be small. 501 Overall, comparing real-time approach in Table 2 with offline though experiment approach in Table 1, there is 502 around $200/Ha (approx. 10%) less profit for real-time decisions. Yet the real-time approach offers significantly 503 higher profits when compared to that under the traditional application guidelines as listed in the last row of Table 2. 504 3.3. Real-time with GFS weather forecast 505 Table 3 gives the performance of the MPC scheduling when the GFS weather forecast for the first 16 days from 506 the current day is used. For weather forecast beyond 16 days, two scenarios are tried, namely, (i) Average of Fifteen 507 years of weather data and (ii) Weather data from a sample year in the history for Greeley, CO. Guided by the results 508 of the offline approach of the thought experiment above, the control inputs are tried every 8th day (7 days gap) of the 509 growing season. 510 For comparison, Figure 5 plots a sample 16 days forecast by GFS+Prophet model along with actual weather as 511 observed in 2008. For illustration, the forecast plots for 30 ℎ June 2008 (DOY of 182) are shown, where the GFS 512 forecasts are in Figure 5 (a-d), whereas those for Prophet are in (e and f). The weather data before DOY 182 is also 513 plotted, that being in past, the actual weather is plotted for those days. 514 Due to the deviation in actual vs. forecasted and the fact that MPC is run only every 8 ℎ day, profits of real-time 515 scheduling is slightly lower compared to the case of thought experiments when the weather for the entire season is 516 known beforehand. The profits for the above two scenarios of GFS weather forecast are respectively 89.4% and 93.4% 517 of that of the thought experiment values with 8 days gap as noted in Table 1. A drop in profit is understandable since the 518 forecasted weather deviates from the actual one (as expected). However the fact that the drop is only a small fraction 519 is encouraging, given that there is no way around it. 520 4. Conclusion 521 The paper presented a very first model-predictive framework for real-time in-season agriculture input decision- 522 making that integrates RZWQM for prediction, RBFOpt for optimization, and GFS+Prophet for forecasting. The 523 integrated framework was implemented in Python and demonstrated using experimental field data from Greeley, Col- A. Bhar and R. Kumar: Preprint submitted to Elsevier Page 13 of 18
You can also read