Predicting Energy And Water Consumption On Dairy Farms Through Statistical Analysis And Machine-learning Methods
Authors:   ,   Cork Institute of Technology, Shine Philip 
Published: August 2024

With the abolishment of milking quotas across all European Union member states in April 2015, dairy farmers must adjust their farming practises to minimise milk production costs to adequately prepare for potential periods of reduced revenue. Milk production is an intense energy and water consuming process. Coupled with challenging European greenhouse gas reduction targets and legislation regarding the prevention of groundwater pollution and deterioration, increasing the production of milk in Ireland must be met with the sustainable consumption of on-farm energy and direct water resources, to ensure the future monetary and environmental sustainability of Ireland’s dairy industry. Thus, this body of work focused on the statistical analysis, and subsequent development and application of empirical prediction models for dairy farm electricity and direct water (E&W) consumption using statistical and machine-learning methods. E&W consumption data were attained through the utilisation of a remote monitoring system installed on a study sample of 58 pasture-based, Irish commercial dairy farms between 2014 and 2017, representing the overall dairy farm demographic. The first objective of this study was to calculate key performance indicators for E&W consumption per litre of milk produced, while also conducting a detailed statistical analysis to determine key drivers of E&W consumption on Irish dairy farms. Key performance indicators of 39.8 watt-hours per litre of milk and 7.4 litres of water per litre of milk were calculated for E&W consumption, respectively. The second objective investigated the development of multiple linear regression models to predict E&W consumption on Irish dairy farms. In total, 15 and 20 dairy farm variables related to milk production, stock, infrastructural equipment, managerial procedures and environmental data were analysed for their ability to predict monthly unseen (data not utilised for model development) E&W consumption, respectively. This was achieved by applying a univariate variable selection technique in conjunction with all subsets regression and 10-fold cross-validation. Overall, the developed multiple linear regression models resulted in relative prediction error (RPE) values of 26% and 49% for E&W, respectively. The third objective investigated the applicability of a CART decision tree algorithm, a random forest, an artificial neural network and a support vector machine (SVM) to predict dairy farm E&W consumption. The methodology employed backward sequential variable selection to exclude variables, which had little or no predictive capability in conjunction with other variables. The methodology also applied hyper-parameter tuning with nested cross-validation for calculating the prediction accuracy for each model on unseen data. The SVM and random forest models improved the prediction of E&W consumption by 54% and 23%, respectively, when compared to the multiple linear regression models’ results. The fourth objective evaluated the accuracy of the SVM when predicting electricity consumption across an annual resolution at both the farm-level and catchment-level (combined consumption of 16 Irish dairy farms). The SVM was then applied to conduct a hypothetical dairy expansion analysis, whereby the impact of increasing herd size and milk production on related electricity consumption across ten infrastructural scenarios (current practise plus nine adaptions of milk cooling systems, milk pre-cooling systems, additional parlour units and hot washing frequency) was assessed. The SVM predicted annual farm-level electricity consumption to within 10.4% (RPE) and catchment-level electricity consumption with an error value of 5.0% (error). The dairy expansion analysis showed economies of scale across all ten infrastructural scenarios between 2018 and 2021. The developed E&W models may provide: 1) key decision support information regarding E&W consumption to both dairy farmers and policy makers, and 2) a means of calculating the impact of Irish dairy farming on natural resources. In particular, results presented in this thesis demonstrate the effectiveness of the SVM model as a macro-level simulation forecast tool for dairy farm energy consumption, which may be utilised using easily accessible farm parameters.