# Detecting Cover Crop End-Of-Season Using VEN\(\upmu\)S and Sentinel-2 Satellite Imagery
## 3 Methods
### WIST Algorithm
#### 3.1.2 Finding the Senescent Period  
Once the daily NDVI time-series was generated, the MACD approach [35] was used to detect the senescence and dormancy onsets. Different from the criteria used in the WISE algorithm [19], the senescence and dormancy onsets were detected from a downward trend. The MACD approach computed the differences between the two Exponential Moving Averages (EMA) to identify an upward or downward trend in a time-series. Supposing we have an NDVI time-series \"v(t)\" (t represents time), EMA for the moving window size of \"n\" can be computed as follows:  
\[\text{EMA}(\text{v}(\text{t}),\,\text{n})=\text{v}(\text{t})\text{+k}+\text{ EMA}(\text{v}(\text{t}-1),\,\text{n})\text{*}(1-\text{k}), \tag{1}\]  
where k = 2.0/(n + 1). As shown in Equation (1), EMA is a weighted moving average that assigns a higher weight to recent observations than the simple moving average (SMA) does. The EMA computation for time-series started from index \"n + 1\" (i.e., t > n). The first EMA (t = n) was computed using the SMA based on the beginning \"n\" points as follows:  
\[\text{EMA}(\text{v}(\text{n}),\,\text{n})=\text{SMA}(\text{v}(\text{n}),\, \text{n})=\sum_{\text{i=1}}^{\text{n}}\text{v}(\text{i})/\text{n} \tag{2}\]  
Figure 4: An example diagram of NDVI and MACD shows the senescence onset (“s”), dormancy (“d”), and the termination date (“t”) of a winter cover crop (triticale and ryegrass mixture) detected from the NDVI and MACD time-series. The WIST algorithm detected a termination date of 28 April 2019 (red square) and the actual termination date was on 30 April 2019 (vertical red line). Dates t1 and t2 represent the period with the most rapid-rate of decrease of NDVI (defined in Section 3.1.3). the MACD at time \"t\" is the difference in EMA using a short moving window (\"a\") and a longer moving window (\"b\") and was computed as follows:  
\[\text{MACD(t)}=\text{EMA(v(t), a)}-\text{EMA(v(t), b)}, \tag{3}\]  
The MACD divergence for the date \"t\" was computed by the following:  
\[\text{MACD\_div(t)}=\text{MACD(t)}-\text{EMA(MACD(t), c)}, \tag{4}\]  
where EMA(MACD(t), c) is a signal line of MACD(t) and can be computed as an EMA of the MACD series for a moving window size (\"c\"). The three parameters--\"a\", \"b\", and \"c\"--in Equations (3) and (4) represent the moving window sizes (days) used to compute the MACD trend. In the previous study [19], we found an optimal combination of MACD (a = 5, b = 10, c = 5) for detecting green-up dates from daily NDVI time-series. Here, we used the same parameters in the cover crop termination algorithm. The MACD divergence tracks the changes of MACD and is more sensitive to small changes. In the WIST algorithm, the MACD divergence (MACD_div) was not used since the algorithm only needs the confirmative senescent period for refining the cover crop termination date. The senescence onset of a time-series NDVI at date \"s\" is defined to satisfy the following condition:  
\[\text{MACD(s}-1)>\text{MACD\_threshold}\]  
and  
\[\text{MACD(s)}<\text{MACD\_threshold}\]  
where MACD_threshold is an adjustable threshold and was set to zero in this study. This condition finds the date when MACD changes from positive to negative, which means the short-term moving average is smaller than the long-term moving average and represents a downward trend. The dormancy onset (\"d\") is defined after the senescence onset \"s\" (i.e., d > s) and should satisfy the following conditions during the senescent (downward) period:  
\[\text{MACD(d)}<\text{MACD\_threshold}\]  
and  
\[\text{SMA(v(d-x), x)}>\text{SMA(v(d), x)}\text{ and SMA(v(d), x)}<\text{SMA(v(d+x), x)},\]  
where \"x\" is the simple moving average (SMA) window size for detecting the change in NDVI. In this study, we define \"x = 3\" (adjustable), which means that the downward trend must continue in the 3 days SMA time-series until it reaches the dormancy date. The MACD plus Vegetation Index (VI-test) strategy was also used in detecting a green-up event in the WISE method [19].