{"id":2304,"date":"2020-07-16T01:21:41","date_gmt":"2020-07-15T23:21:41","guid":{"rendered":"https:\/\/arm.ual.es\/arm-group\/?p=2304"},"modified":"2020-07-16T01:21:46","modified_gmt":"2020-07-15T23:21:46","slug":"universidad-de-almeria-develops-and-deploys-greenhouse-models-as-a-service-to-maximize-crop-production","status":"publish","type":"post","link":"https:\/\/arm.ual.es\/arm-group\/2020\/07\/16\/universidad-de-almeria-develops-and-deploys-greenhouse-models-as-a-service-to-maximize-crop-production\/","title":{"rendered":"Universidad de Almer\u00eda Develops and Deploys Greenhouse Models as a Service to Maximize Crop Production"},"content":{"rendered":"\n<div class=\"wp-block-image\"><figure class=\"alignright size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"640\" height=\"360\" src=\"https:\/\/arm.ual.es\/arm-group\/wp-content\/uploads\/2020\/07\/noticia.jpg\" alt=\"\" class=\"wp-image-2305\"\/><figcaption>The greenhouse models as a service system (GMaaS) developed by Universidad de Almer\u00eda researchers.<\/figcaption><\/figure><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">By Mathworks<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u201cWith MATLAB Production Server, deploying a new model is simple. I develop and test the model on my computer in MATLAB, compile it into a package, and then upload the package to the server. I don\u2019t need to recode the model myself or involve other programmers.\u201d<small>&nbsp;Jos\u00e9 Luis Guzm\u00e1n S\u00e1nchez, Universidad de Almer\u00eda<\/small><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The region around Almer\u00eda, Spain, has the largest concentration of greenhouses in the world. Covering more 33,000 hectares, the greenhouses produce enough fruits and vegetables each year to meet about half of European demand. To help researchers and farmers optimize greenhouse production and profitability, a team of Universidad de Almer\u00eda (UAL) researchers created greenhouse models as a service (GMaaS). The GMaaS system is part of the EU-funded Internet of Food &amp; Farm project, which aims to increase yields of better-quality produce with Internet of Things (IoT) technologies.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">UAL\u2019s models, developed in MATLAB<sup>\u00ae<\/sup>&nbsp;and deployed in the cloud with MATLAB Production Server\u2122, combine data from IoT sensors with market and weather data to enable simulation of greenhouse processes and automated control of temperature, irrigation volume, irrigation times, and other key variables.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u201cMATLAB made it easy to translate equations and ideas into code,\u201d says Jos\u00e9 Luis Guzm\u00e1n S\u00e1nchez, professor at Universidad de Almer\u00eda. \u201cAfter we had developed our models, MATLAB Production Server enabled us to make all of them accessible via the cloud without recoding them in another language, saving months of development effort.\u201d<\/p>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_88 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<label for=\"ez-toc-cssicon-toggle-item-6b030060ccbf5\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-6b030060ccbf5\"  aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/arm.ual.es\/arm-group\/2020\/07\/16\/universidad-de-almeria-develops-and-deploys-greenhouse-models-as-a-service-to-maximize-crop-production\/#Challenge\" >Challenge<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/arm.ual.es\/arm-group\/2020\/07\/16\/universidad-de-almeria-develops-and-deploys-greenhouse-models-as-a-service-to-maximize-crop-production\/#Solution\" >Solution<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/arm.ual.es\/arm-group\/2020\/07\/16\/universidad-de-almeria-develops-and-deploys-greenhouse-models-as-a-service-to-maximize-crop-production\/#Results\" >Results<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Challenge\"><\/span>Challenge<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The UAL researchers needed a programmatic way to implement complex sets of nonlinear differential equations containing physical, chemical, and biological variables. The GMaaS climate model, for example, includes about 20 of these equations. Each model had to be calibrated using historical data gathered from greenhouse operations over many years. The team also needed a way to rapidly develop and evaluate model predictive control algorithms for temperature and irrigation that would use the models.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The UAL team wanted to deploy the models as a web-accessible service to make them widely available to farmers, researchers at other institutions, and students. The team initially considered reimplementing the models in Python or another language, but they estimated that this effort would take a year or longer. Further, recoding in another language could introduce bugs into models that had already been extensively validated.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Solution\"><\/span>Solution<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">UAL researchers used MATLAB to develop the greenhouse models and used MATLAB Production Server to deploy the models as web-accessible services.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Working in MATLAB, the team developed climate, irrigation, and production models based on nonlinear differential equations.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The climate model calculates optimal day and night temperature set points based on weather forecasts and indoor temperature and humidity. The crop production model combines an estimate of the current stage of the crops with market data to suggest an optimal harvest time. The irrigation model uses temperature, humidity, and growth predictions from the other models to estimate crop irrigation and nutrient requirements.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Each model was calibrated using greenhouse data and either a genetic algorithm solver from Global Optimization Toolbox or custom calibration algorithms.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Using Control System Toolbox\u2122 and Model Predictive Control Toolbox\u2122, the UAL team developed control systems to automate greenhouse processes. In one system, for example, they combined a PID controller for variables that change relatively quickly, such as temperature and humidity, with a higher-level model predictive controller for variables that change more slowly, such as crop growth, market prices, and weather conditions.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The team packaged the greenhouse models using MATLAB Compiler SDK\u2122 and then deployed them using MATLAB Production Server. They tested the deployment by accessing the models via a RESTful API using JSON-formatted input and output.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The GMaaS system is being used by farmers and by the university as a teaching tool. In one undergraduate class, students design control algorithms in MATLAB and close the control loop with the GMaaS system.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The team is currently developing and testing a plant disease model. This model will be added to the GMaaS system together with models for microalgae production, wastewater treatment, and solar energy.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Results\"><\/span>Results<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>Cloud deployment time cut by more than 90%.&nbsp;<\/strong>\u201cIt would have taken us at least a year to deploy our models to the cloud if we had recoded them in another language,\u201d says Guzm\u00e1n S\u00e1nchez. \u201cWith MATLAB Production Server, we set up, deployed, and verified the service in about a month\u2014with no code changes.\u201d<\/li><li><strong>Model updates accessed immediately.&nbsp;<\/strong>\u201cWhen we shared our models with Ph.D. students and other researchers in the past, we had to track who had the models and remember to send updates, which then had to be installed,\u201d says Guzm\u00e1n S\u00e1nchez. \u201cNow, after I test an update locally, I deploy it with MATLAB Production Server, and it is available to all users immediately.\u201d<\/li><li><strong>Greenhouse revenues increased by 15%.&nbsp;<\/strong>\u201cUsing the models and the control architecture that we developed in MATLAB, we improved the quality of greenhouse crops and increased incomes for the farmers,\u201d says Guzm\u00e1n S\u00e1nchez. \u201cSpecifically, quality increased by 10% and incomes rose by 15% because crops were harvested at the correct moment according to market prices.\u201d<\/li><\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Source: <a href=\"https:\/\/www.mathworks.com\/company\/user_stories\/universidad-de-almeria-develops-and-deploys-greenhouse-models-as-a-service-to-maximize-crop-production.html\">https:\/\/www.mathworks.com\/company\/user_stories\/universidad-de-almeria-develops-and-deploys-greenhouse-models-as-a-service-to-maximize-crop-production.html<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>By Mathworks \u201cWith MATLAB Production Server, deploying a new model is simple. I develop and test the model on my computer in MATLAB, compile it into a package, and then upload the package to the server. I don\u2019t need to recode the model myself or involve other programmers.\u201d&nbsp;Jos\u00e9 Luis Guzm\u00e1n S\u00e1nchez, Universidad de Almer\u00eda The [&hellip;]<\/p>\n","protected":false},"author":7,"featured_media":2305,"comment_status":"open","ping_status":"open","sticky":true,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-2304","post","type-post","status-publish","format-standard","has-post-thumbnail","category-news","czr-hentry"],"_links":{"self":[{"href":"https:\/\/arm.ual.es\/arm-group\/wp-json\/wp\/v2\/posts\/2304","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/arm.ual.es\/arm-group\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/arm.ual.es\/arm-group\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/arm.ual.es\/arm-group\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/arm.ual.es\/arm-group\/wp-json\/wp\/v2\/comments?post=2304"}],"version-history":[{"count":4,"href":"https:\/\/arm.ual.es\/arm-group\/wp-json\/wp\/v2\/posts\/2304\/revisions"}],"predecessor-version":[{"id":2309,"href":"https:\/\/arm.ual.es\/arm-group\/wp-json\/wp\/v2\/posts\/2304\/revisions\/2309"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/arm.ual.es\/arm-group\/wp-json\/wp\/v2\/media\/2305"}],"wp:attachment":[{"href":"https:\/\/arm.ual.es\/arm-group\/wp-json\/wp\/v2\/media?parent=2304"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/arm.ual.es\/arm-group\/wp-json\/wp\/v2\/categories?post=2304"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/arm.ual.es\/arm-group\/wp-json\/wp\/v2\/tags?post=2304"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}