Document Type



Electrical and Computer Engineering | Engineering

Publication Details

Computers and Electronics in Agriculture, vol. 221. © 2024 The Author(s).


The objective of this paper was to define, validate and demonstrate a model capable of accurately simulating dairy farm electricity consumption across varying herd and parlour sizes, to facilitate research investigating renewable energy systems (RES) and demand side management (DSM). The Farm Electricity System Simulator (FESS) was developed using grey-box modelling techniques utilizing empirical data for parameter tuning. Empirical data were gathered from nine spring calving, pasture based dairy farms located in the Republic of Ireland. A k-means clustering analysis was conducted, separating the farms into three, near homogenous groups, from which representative farms were selected. FESS was trained using 12 months of data from three representative farms using the repeat hold out method for data partitioning with 75 % of data used for training and 25 % used for validation. An optimisation algorithm was used to minimize the error during model training. Through cross-validation, FESS achieved a root mean squared error (RMSE) of 7.65 kWh, mean absolute percentage error (MAPE) of 7.10 %, mean percentage error (MPE) of −0.86 % and a relative prediction error (RPE) of 7.56 % for total daily electricity consumption. Across the three farms, the simulated outputs of FESS achieved an average R2 value of 0.72, demonstrating good agreement with observed data. FESS’s utility was demonstrated by analysing the effects of different electricity pricing structures and on-site solar photovoltaic electricity generation on total farm energy costs. We concluded that FESS simulated on-farm electricity consumption with sufficient accuracy for the intended application. FESS accurately simulated dairy farm electricity consumption across three dairy farms of different herd and parlour sizes while evaluating the effects of demand side management and renewable generation on farm electricity consumption and costs.