{"id":773830,"date":"2021-09-14T10:09:20","date_gmt":"2021-09-14T17:09:20","guid":{"rendered":"https:\/\/www.microsoft.com\/en-us\/research\/?p=773830"},"modified":"2022-05-19T11:25:11","modified_gmt":"2022-05-19T18:25:11","slug":"micro-climate-predictions-enabling-hyper-local-decisions-for-agriculture-and-renewables","status":"publish","type":"post","link":"https:\/\/www.microsoft.com\/en-us\/research\/blog\/micro-climate-predictions-enabling-hyper-local-decisions-for-agriculture-and-renewables\/","title":{"rendered":"Micro-climate predictions: Enabling hyper-local decisions for agriculture and renewables"},"content":{"rendered":"\n
It is springtime in Eastern Washington, USA, and the temperature is slightly above freezing. A farmer is preparing to fertilize his fields of wheat and lentils as winter runoff and frost are nearly finished. The plants are susceptible to fertilizer at freezing temperatures, so the farmer checks forecasts from the local weather station, which is about 50 miles away. The three-day outlook shows temperatures above freezing. The farmer rents equipment and starts fertilizing the farm. But at night, the temperature in parts of the fields drops below freezing and kills around 20% of the crops. This is unfortunately a common situation, since climatic parameters can vary over short distances and even between sections of the farm.<\/p>\n\n\n\n
To address this problem and others, we developed DeepMC, a framework for predicting micro-climates, or the accumulation of climatic parameters formed around a relatively small, homogeneous region. Micro-climate predictions are beneficial in agriculture, forestry, architecture, urban design, ecology conservation, maritime and other domains. DeepMC predicts various micro-climate parameters with over 90% accuracy at IoT sensor locations deployed around the world.<\/p>\n\n\n\n
This work is a part of a Microsoft Research initiative, Research for Industry<\/a>, which aims to address challenges including climate change, pandemics, and food security through technological breakthroughs. To learn more about the work Microsoft is doing to enable data-driving farming, check out the FarmBeats: AI, Edge, and IoT agriculture project page<\/a>. <\/p>\n\n\n\n Photography by Maryatt Photography<\/p>\n\n\n\n Prediction meets practical decision making<\/strong> <\/p>\n\n\n\n Climatic parameters are stochastic (randomly occurring) in nature, making them difficult to model for prediction tasks. The methodology used to build the prediction model must meet four significant challenges: <\/p>\n\n\n\n DeepMC is designed to satisfy each of these requirements, which we discuss below, along with building the appropriate architecture. We also present scenarios where DeepMC is being used today and examine its potential impact on environmental sustainability and broader industrial applications.\u201c For deeper details, read our paper titled, \u201cMicro-climate Prediction \u2013 Multi Scale Encoder-decoder based Deep Learning Framework (opens in new tab)<\/span><\/a>\u201d which was published at the Proceedings of 27th ACM SIGKDD Conference on Knowledge Discovery and Data Mining (opens in new tab)<\/span><\/a><\/span>.<\/p>\n\n\n\n DeepMC builds on top of the Azure FarmBeats platform to predict micro-climatic parameters in real-time, with inputs from weather station forecasts and IoT sensors. The parameters collected depend on the predicted variable of interest. We can collect current data as well as forecasts for ambient temperature, ambient pressure, humidity, soil moisture, soil temperature, radiation, precipitation, wind speed and wind direction. <\/p>\n\n\n\n The DeepMC learning framework, shown in Figure 1, is based on a sequence-to-sequence encoder-decoder framework consisting of five distinct parts: 1) pre-processor, 2) forecast error computer, 3) wavelet packet decomposition, 4) multi-scale deep learning, and 5) attention mechanism. The decoder is a multi-layer, long short-term memory (LSTM) and fully connected layer. Each component is described in the following subsections with some implementation details for the sake of reproducibility.<\/p>\n\n\n\n\n\n Sensor data is received using IoT sensors deployed on the farm. The raw data is usually noisy, with missing data and varying temporal resolution. We standardize the temporal resolution using average values for the data collected.<\/p>\n\n\n\n DeepMC uses weather station forecasts of the predicted variable to learn better models for micro-climate predictions. Instead of predicting the climatic parameter directly, we predict the error between the nearest commercial weather station forecast and the local micro-climate forecast. This is based on the hypothesis that hyperlocalization of weather station forecasts is more efficient than learning the relationships of the predicted climatic parameter y with the other parameters z and auto-relationship of the y with itself at earlier times.<\/p>\n\n\n\n One artifact of using the forecast error as the predictor signal is that it does not inherently capture the effect of distance of the weather station from the point of interest. For this purpose, we include a Relative Latitude (RLat) and Relative Longitude (Rlong) as additional features.<\/p>\n\n\n\n RLat <\/em>= Lat<\/em>(Weather Station<\/em>)\u2212Lat<\/em>(Micro<\/em>\u2212region<\/em>),<\/em> <\/p>\n\n\n\n RLong\u00a0<\/em>=\u00a0Long<\/em>(Weather Station<\/em>)\u2212Long<\/em>(Micro<\/em>\u2212region<\/em>).<\/em><\/p>\n\n\n\n\n\n\n\n Wavelet Packet Decomposition (WPD) is a classical signal processing method built on wavelet analysis, which gives an efficient way to decompose time series from the time domain to scale domain. It localizes the change across time within different scales of the original signal. Decomposing original time series using WPD gives signals with multiple levels of trends and details. In the context of climatic data, this corresponds variations such as long-term trends, yearly variation, seasonal variation, daily variations, etc.<\/p>\n\n\n\n Once we have prepared the output data from WPD in the previous step \\(o_{WPD}^{(n,m)}, \\forall n,m \\in [1,N]\\), we input it into the deep learning network. We separate the data into long-scale (latex]n[\/latex] or \\(m=1\\)), medium-scale (\\(n,m \u2208\\)[2,\\(N\\) \u22121]) and short-scale (\\(n\\) or \\(m = N\\)) signals. The long-scale signals pass through a CNN-LSTM stack. The medium-scale and the short-scale signals pass through a multi-layered CNN stack. For the data with short-term dependencies (medium and short scale data), the CNN layer has similar performance and faster computing speed when compared to the LSTM recurrent layer. Thus we use CNN network layers for the medium- and short-scale data. For the long-scale data, the CNN network layers extract the deep features of the time series and the LSTM layer sequentially processes the temporal data with long-term and short-term dependence. Therefore, CNN-LSTM architecture is used for long-scale data.<\/p>\n\n\n\n\n\n DeepMC uses two levels of attention models, similar to those used in vision-to-language tasks. First is a long-range, guided attention model which is used with the CNN-LSTM output and memorizes the long-term dynamics of the input time series. We use a position-based content attention model described by Cinar et al. 2017 for this level.<\/p>\n\n\n\n The second level attention model is scale guided attention model and is used to capture the respective weighting of different scales. The scale guided attention model uses an additive attention mechanism described here. The outputs of the multi-scale model (including the output of the long-range guided attention mechanism on the CNNLSTM stack) is represented as \\(o^{(m,n)}, m,n \\in [1,N]\\).<\/p>\n\n\n\n The DeepMC decoder uses LSTM to generate a sequence of\u00a0L\u00a0<\/em>outputs, which is equal to the number of future timesteps to be predicted. The decoder LSTM layer receives a multivariate encoded time series and produces a vector for each step of prediction. Each output of the LSTM\u00a0is connected with\u00a0two\u00a0layers of time-distributed,\u00a0fully connected layer.<\/p>\n\n\n\n\n\n\n\n DeepMC is deployed across many different regions of the world on top of Azure FarmBeats. In this section, we present four real-world scenarios in agriculture and energy weather conditions impact operations. We also show some results in comparison to common models used to solve prediction tasks in addition to comparisons with some variations on DeepMC. <\/p>\n\n\n\n Figure 3 shows the wind speed predictions at the 24th hour over a period of 10 days with one-hour resolution. Figure 4 plots the RMSE (Root Mean Squared Error) for each hour prediction and compares with other models. DeepMC shows significantly better performance and is more likely to follow the details and trends of the time series data. Other models used for comparison (in this case for wind speed) are the CNNLSTM model, modified CNNLSTM with LSTM decoder, regular convolutional network with LSTM decoder, a vanilla LSTM-based forecaster, and a vanilla CNN-based forecaster. Of interest: the performance of all models decreases as the horizon of prediction increases, which is to be expected, as it is more accurate to predict the next immediate hour versus a forecast on the 24th hour. Figure 5 plots the RMSE, MAE (Maximum Absolute Error) and MAPE (Maximum Absolute Percentage Error) values for micro-wind speed predictions using various models, averaged over all 24-step predictions.<\/p>\n\n\n\n Micro-radiation predictions are required to estimate the electricity produced at commercial solar farms. These predictions are fed into an optimization model to fulfill price and energy commitments by the utility company in the energy markets. Radiation received at the solar panel is sensitive to seasons of high overcast or rain. Figure 6 plots the predictions across months during the overcast season and after. The predictions attain a high accuracy for the month after the monsoon in July, with scores MASE1 <\/sup>= 1.86, MAE= 65.14, RMSE = 116.30. Table 1 compares DeepMC\u2019s MAE, MAPE and RMSE scores with other commonly used models. <\/p>\n\n\n\n
<\/li><\/ul>\n\n\n\n\n\t\t
Data requirements <\/h2>\n\n\n\n
Methodology <\/h2>\n\n\n\n
Real-world deployments<\/h2>\n\n\n\n
Comparison: micro-wind speed predictions<\/h2>\n\n\n\n
Solar Farm: micro-radiation predictions<\/h2>\n\n\n\n