Understanding the Impact of Spot Market Electricity Price on Wastewater Asset Management Strategy

Development of an advanced pumping control scheme is one of the useful methods that can be applied in operational optimisation of wastewater pumps. Optimisation of pumping control can benefit the utility by overall cost saving using different electricity pricing schemes from the energy market. As electricity prices can be varied based on the spot market in some countries such as Australia, the consideration of operating the pumps at the most favourable electricity price, when managed correctly, can offer remarkable savings. This paper provides understanding on the electricity spot price behaviour of South Australia in the National Electricity Market (NEM). Half-hourly electricity spot price data of over 22 years from January 1999 to June 2021 were analysed to investigate the key characteristics of spot prices, including seasonality (intraday, intraweek and seasonal price patterns), spiky behaviour and occurrences of negative prices. In addition, the possible impacts of other factors on electricity spot prices such as electricity demand and weather conditions on pump control were examined. Results indicate a strong relationship between electricity demand and spot price with the Pearson correlation coefficient up to R = 0.95, and extreme high spot prices tended to occur on scorching days with the maximum temperature above 35 °C when air-conditioner usage was high. This paper also explains the importance of electricity spot prices in the wastewater pump on/off operations and analyses opportunities for cost savings by including electricity spot price forecasts as an input of the smart controller to enhance the efficiency of the real-time pumping control.


Introduction
Current electricity markets, in general, are operating as two main types, including energy-only markets (e.g., Singapore, New Zealand and Australia) and capacity-energy markets (e.g., USA, UK and France). The energy-only markets only pay generators for their production of electrical energy, while the capacity-energy markets pay them additional payment for their available capacity to guarantee the grid reliability [1]. In an energy-only market, the spot market plays a vital role as it directly affects the contract prices and governs the exposed part of the portfolio of retailers and generators [2]. Electricity price in the spot market, defined as the halfhour price of the wholesale market, is a different concept from other pricing schemes. The wholesale spot market provides electricity prices every 30 min instead of one price for every trading interval during the day as the single rate tariff, and the same prices for several consecutive hours corresponding to different periods in a day (e.g., peak/off-peak/ shoulder hours or day-/night-time) as the time-of-use tariff. It allows generators, retailers, and other stakeholders to trade electricity before delivering it to their customers. Electricity cannot be stored; hence its spot market price is significantly sensitive to changes in real-time supply and demand [3].
Pumping systems in the wastewater networks are operated and rely on electricity. The electricity expenditure spent on pumping systems accounts for a significant part, 34% of the wastewater networks total life cycle costs [4]. Therefore, cost reduction strategies are always a priority of wastewater asset management. The pump stations cannot stop working for several consecutive hours just for the purpose of cost saving, as the sewage flow that goes into the network continuously and may lead to spill over in the network. Hence, running the pumping system based on the time-of-use tariff is not an ideal option for a wastewater network. In the case of single rate tariff is applied, monetary savings cannot be obtained. Water/wastewater utilities should consider the electricity spot pricing scheme to overcome the shortfall of other tariffs and provide cost saving opportunities if the pumps are operated during the low-cost periods. Electricity spot market has significant financial impact on water/ wastewater utility operations. Hunter Water Australia has been successful in reducing over Aus$100,000 of electrical energy costs per year for their pumping stations in the Lower Hunter region water networks by careful management of the wholesale energy market [5]. The dynamic pricing behaviour of the electricity spot market should be explored and further analysed.
Some researchers selected the South Australia region in the Australian National Electricity Market (NEM) as one of their case studies to analyse electricity spot price data for different purposes. Higgs and Worthington [6] employed a 6-year dataset from 1 January 1999 to the end of 2004 for model development to study the dynamics of spot prices in NEM. Thomas et al. [7] analysed a 7-year dataset of halfhourly prices from 1 January 1999 to 31 January 2006 to examine how seasonality and spikes affect electricity prices. Mayer and Trück [8] used a longer sample period of 14 years from 1 January 1999 to 31 December 2012 to implement a comprehensive analysis and comparison of characteristics of electricity markets in Australia and 18 other countries. Han et al. [9] investigated the impacts of volatility spill over dynamics across regions in NEM using a dataset throughout 8 years from 1 January 2010 until the end of 2017. In this study, South Australia electricity spot market was also selected for the investigation as the most current reference shows South Australia was always in the top two Australian mainland states which had higher annually average prices during the 2016-2019 period [10]. From the analysis on the electricity spot price data of South Australia, it has been shown that this pricing scheme should be considered in pumping control to obtain possible monetary savings in the Murray Bridge wastewater network [10]. The purpose of this paper is to examine the spot market price behaviour to assess the feasibility of using it as a predictive input to the smart pump control system. It also focuses on how electricity demand and weather conditions affect the electricity spot price fluctuations. In addition, this paper analyses electricity spot price data to understand how it impacts on operations and maintenance. The findings of this study regarding characteristics of electricity spot price and its determinants can contribute to development of a forecasting model and provides operators and engineers with useful information to control and manage wastewater pump stations by including financial consideration.

Materials and Methods
The procedures investigate the differences of prices over different lengths of time such as hour, day, month, and year and seek opportunities to achieve cost savings when operating pump stations in a wastewater network. Three characteristics, including multi-scale seasonality, spiky behaviour, and negative prices, were considered.

Data Sources
An actual 30-min interval electricity spot price dataset of over 22 years (1 January 1999-30 June 2021) with 394,402 data points was collected from the Australian Energy Market Operator (AEMO) website (https:// aemo. com. au/) [11]. This covered an extended longer sample period than reported in the existing literature. Additionally, data related to electricity demand and temperature were used to identify their impacts on electricity spot prices. For electricity demand, a half-hourly dataset for the same period (1 January 1999-30 June 2021) and number of data points (394,402) as that of electricity spot prices was also acquired from the AEMO website [11]. For temperature, a representative weather station for South Australia, Station 023,034 Adelaide Airport with available data for the whole 1999-2021 period was selected to collect daily maximum temperature data from the website of the Bureau of Meteorology (BOM) (http:// www. bom. gov. au/ clima te/ data/) [12]. All data were obtained with free access.

Data Pre-treatment
The present worth adjustment was conducted for the collected half-hourly electricity spot price data. The original data (Dataset 1) spans over a long period of over 22 years from 1999 to 2021. Due to inflation, the value of prices in the past are not equal to their current values. In other words, Aus$100 in 1999 is not corresponding to Aus$100 in 2021 and should not be compared directly. By applying inflation rates for each year in Dataset 1, prices in previous years were calculated to match the values of 2021. The adjustment was not applied for negative prices. This gave the inflationadjusted dataset (Dataset 2). These values were then used for analysing the electricity spot price data.

Data Analysis and Interpretation
Intraday, intraweek and seasonal patterns of electricity spot prices in South Australia were visually depicted by boxplots and other graphs. All negative and zero electricity spot prices were identified to see the frequency of their occurrences during the studied time period. In addition, the number of occurrences of electricity price spikes was also examined. Specified price threshold method, such as fixed price thresholds and variable price, was used for spike identification [13]. For the fixed price threshold method, any price that exceeds this fixed value were classified as spikes [14][15][16][17][18]. For the variable price threshold method, spikes were those that surpass a certain percentage of the largest or smallest values in the dataset [19]. A related method to the variable price thresholds using mean and standard deviation for calculation [13,20] was used in this study. According to Ramiah et al. [21], the price threshold was calculated using four standard deviations plus the mean of the dataset as shown in Eq. 1.
where: μ = mean of the original dataset μ = mean of the original dataset

Electricity Demand
The half-hourly average data of spot price and demand of electricity in South Australia by time of the day were computed to investigate their possible association. The Pearson correlation coefficient denoted R was used to indicate the direction and strength of their relationship (Eq. 2).
where: R = Pearson correlation coefficient; x i = individual data value in the electricity spot price dataset; y i = individual data value in the demand dataset; μ x = mean of the electricity spot price dataset; μ y = mean of the demand dataset; σ x = standard deviation of the electricity spot price dataset; σ y = standard deviation of the demand dataset; N = number of data points.
R values vary between − 1 and 1. If R < 0, there is an inverse relationship between two variables, while if R > 0, there is a direct relationship between them. In case R = 0, no relationship is identified between two variables. The interpretation of R is shown in Table 1.

Weather Conditions
Dataset 1 of electricity spot price was sorted from largest to smallest to find out the top 15 dates with extremely high prices. Maximum temperatures of those dates were then looked up from the BOM website for Station 023,034 Adelaide Airport to examine the possible impacts of them on electricity spot prices in South Australia.

The Australian National Electricity Market (NEM)
Since 1998, the National Energy Market (NEM) in Australia has been a market where the trade has happened 24/7 regarding wholesale commodity exchange. In this market, generators receive payments for the electricity they offer; large industrial and commercial electrical energy consumers make contracts with generators and purchase electricity directly from the spot market, while households and small businesses buy electricity from their retailers [22]. These contracts help both generators and customers not be affected by price fluctuation and volatility in the electricity spot market. The trading in NEM is operated by the AEMO. The electricity prices are bid by different generators to the AEMO in each of the six 5-min intervals in a 30-min trading period which specifies how much electricity they would like to provide and at what price. These offers are accepted by the AEMO, beginning with the lowest to the higher generators until the amount of electricity matches the forecast demand. The AEMO then determines the cheapest and most effective generation mix. Every half an hour, six dispatch electricity prices are averaged to identify the spot price at that 30-min period for each region. According to the National Electricity Rules, in the wholesale market, spot prices can be bid into the market restricted by maximum and minimum limits. The current Market Floor Price (MFP) is minus Aus$1,000/ The NEM planned to change the 30-min settlement to 5-min settlement for the electricity spot prices that means prices are computed every 5 min. The change came into effect on 1 October 2021. As stated by the Australian Energy Market Commission (AEMC) [23], a market with the 5-min settlement offers better price signals than the 30-min settlement as it aligns with physical operations, enabling managers and operators to make more reasonable decisions in operations management and develop more effective bidding and investment strategies. For the 5-min settlement, more periods (intervals) in which the spot prices are in extreme range are observed. It may lead to higher potential monetary savings for the systems operated under this electricity pricing scheme compared to the 30-min settlement. This research was conducted before the commencing date of the 5-min settlement; therefore, the 30-min interval electricity spot price data were employed.

Electricity Spot Price Patterns
In comparison to other commodities, electricity prices have the most conspicuous seasonal component [24]. Within a specific time period such as a day, a week and a calendar year, patterns of spot prices (e.g., intraday, intraweek and seasonal) are observed. Commercial activities during a single day and a week are associated with fluctuations in electricity prices. Consequently, the spot prices are different from peak to off-peak hours and from weekdays to weekends. As weather conditions are different between hot and cold seasons, seasonal patterns can also be found in a calendar year. Periodical behaviours are not consistent but different from market to market due to their geographical locations. For example, Australia is in Southern Hemisphere, so its seasons are opposite to those of countries and territories in the Northern Hemisphere. In this country, spring is from September to the end of November; summer includes December, January and February; autumn spans from March until May; and winter months are June, July and August. From this section onwards, only the original dataset (Dataset 1) with 394,402 datapoints was mainly employed to analyse electricity spot prices in South Australia.

Intraday Patterns
The intraday patterns of electricity spot prices in South Australia are discussed in this section. It is expected that there are significant differences in prices between peak and off-peak/shoulder hours due to variations in electricity demand of households and businesses in a day. Half-hourly average electricity spot prices by time of the day from 1999 to 2021 were calculated and plotted in Fig. S1 a and b in the supplementary information (SI). During the peak hours in the morning in recent years (2017-2021), the electricity spot prices peaked at 7:00, while at 08:00-10:00 in previous years. During the peak hours in the afternoon and early evening, the prices were higher and hit the peak at around 15:30-16:00 and 18:00-18:30. The prices of almost all years tended to be significantly lower throughout after-midnight hours and reached the lowest level at 04:00, excluding the three most recent years from 2019-2021. Generally, the same patterns occurred in each year over the 1999-2021 period. The electricity spot prices were much cheaper after midnight and more expensive during the afternoon peak hours and plateaued twice in a day.
The boxplots in Fig. 1a and b show a comparison between electricity spot prices by time of the day of the original dataset (Dataset 1-original) and the inflation-adjusted dataset (Dataset 2 -present worth adjusted), respectively. For a boxplot graph, the horizontal lines in the middle of the boxes indicate the median values of the dataset. The crosses represent the mean values. If the mean is above the median and/ or outside of the box, it may show evidence of outliers and/ or price spikes that significantly push the mean up. The bottom and top boundaries of each box denote the first quartile (25th percentile) which is larger than 25% of the data and the third (75th percentile) which is smaller than 25% of the data, respectively. The difference between these two quartiles or the length of the box is the interquartile range (IQR). The two vertical lines extended from the boxes are called whiskers. The upper whisker shows the maximum value within the range of the third quartile plus 1.5 times IQR, while the lower one indicates the minimum value within the range of the first quartile minus 1.5 times IQR. The outliers that lie outside the whiskers were excluded from the boxplots for a better presentation but still included in the statistical analysis. In these two figures, there is a negligible difference in terms of patterns of electricity spot prices over 48 trading intervals. The only minor difference is that the price variation of Dataset 1 is lower than that of Dataset 2. Therefore, data interpretation is not affected, and the analysis could be conducted based on Dataset 1, the original dataset in this paper.
As in Fig. 1a, the prices greatly depend on different times of the day. Similar patterns were observed. From 0:30 to 6:30, the prices tended to be lower than in other hours and reached the lowest level at 4:00. The higher prices occurred in the morning at 7:00 and in the late afternoon between 18:00 and 19:00. The longer whiskers of boxplots during these late afternoon peak hours (18:00-19:00) imply the considerably higher variability of spot prices of this time period. The trading interval 16:00 reached the highest average price in a day. The average prices of trading intervals over 5 h from 13:30 to 18:30 exceeded the top edges of the boxes, which is likely to indicate the existence of outliers and price spikes. Figure S2 a-d in the SI shows the half-hourly average electricity spot prices in South Australia by time of the day and by seasons, spring, summer, autumn and winter, respectively. For the four seasons, the lower prices were also observed during after-midnight hours and then peaked the first time in the morning at around 07:00 in spring and autumn. The first peak happened later at 08:30 in summer and winter. The second peak in a day in summer occurred in the afternoon at 16:00, while in three remaining seasons, it occurred in the early evening at around 18:00-19:00. The high-level dispersion in prices during peak hours in the afternoon in summer and in the morning and evening in winter is more clearly seen compared to spring and autumn. Summer had the largest number of trading intervals which was much higher than the upper bound of its corresponding box, which implies the high frequency of price spikes in this season. The half-hourly average electricity spot prices by time of the day of four seasons will be further discussed and compared later.

Intraweek Patterns
This section gives an indication of the intraweek patterns of the electricity spot prices in South Australia between 1999 and 2021 focused on the differences in prices between weekdays and weekends for the whole Dataset 1. Figure 2a shows the boxplot for the whole study dataset by different days of the week. The lengths of the boxes of Monday to Friday were similar, which means the electricity spot prices on weekdays have the same variability. Over the weekend, the prices were lower than over weekdays. Thursdays recorded the highest average price while Sundays the lowest. It can be seen that the average price of Thursdays was higher than its corresponding box's upper bound. This implies that price spikes occurred most frequently on Thursdays compared to the remaining days in a week.
Half-hourly spot prices by time of the day grouped by every single day in a week are shown in Fig. 2b. From 00:00 to 04:30, the average prices of each trading interval for all days were close and had the same downward trend. Similarly, from 19:00, the prices also decreased every 30 min till 23:30. During this period (19:00-23:30), they were nearly at the same levels for 5 out of 7 days, excluding Thursday and Saturday. The significant differences in spot prices of each Half-hourly average electricity spot prices in South Australia by day of the week and by season, spring, summer, autumn and winter, respectively, are revealed in Fig. S3 a-d in the SI. These figures show that in four seasons, halfhourly average prices during off-peak hours after midnight till 04:30 were nearly the same. In other trading intervals for all seasons, Sunday was always the day in a week that experienced the lowest average prices, followed by Saturday with the second lowest. Thursdays in spring, summer and autumn experienced the highest average prices, while in winter, Mondays. The highest average prices on Thursday by trading interval of these three seasons occurred in the afternoon which was under Aus$150/MWh. In summer, this value was significantly higher, Aus$300/MWh. For winter, the highest average prices happened on Mondays which was about Aus$175/MWh.
The half-hourly average spot prices in South Australia on weekdays and weekends for the whole dataset can be seen in Fig. 3. The average prices of electricity by time of the day on weekdays are higher than on the weekends during the early morning till early evening.
The differences in prices by time of the day between weekdays and weekends in four seasons are also illustrated in Fig. S4 a-d in the SI. During the afternoon till early evening hours (13:00-19:30) in the summer season, the weekends' spot prices were considerably lower than those of weekdays (Fig. S4b). In particular, the prices on weekdays were up to more than threefold they were on weekends, and their difference ranged from nearly Aus$40/MWh to Aus$160/MWh. In the other seasons, the highest price on weekends only differed approximately Aus$30-60/MWh from that on weekdays. It can be stated that the difference between electricity spot prices of weekdays and weekends during summer is significantly greater than the three remaining seasons. Electricity spot prices, therefore, are strongly affected by day of the week.

Seasonal Patterns
Electricity spot prices in South Australia were initially investigated by graphing boxplots for each year in the 1999-2021 period (Fig. S5 a and b in the SI). Boxplot of 2021 only includes six months of data from January to January. In each boxplot, the months were sorted according to seasons from autumn to winter, spring and summer, starting with March. This section mainly focuses on analysing spot prices in the summer and winter months in which demands are higher due to weather conditions. The spot prices of summer and winter tended to be more significantly dispersed with longer whiskers compared to other seasons. For analysing the more than two-decade period, the higher position of mean price compared to the corresponding top boundary of the boxplot which occurred most frequently in summer months with 26 times, followed by winter with 11, spring with 10 and autumn with 9. Especially in summer, the means were higher than the upper edges of the boxes that means this season may observe more extreme spot prices. In general, there was no change in the patterns of the electricity spot prices with higher price throughout extreme hot and cold weather condition seasons including summer and winter over the analysed 22 years. Figure 4 shows monthly pattern for the half-hourly electricity spot prices grouped in month for Dataset 1. From this boxplot, the prices increased during spring to middle of winter (March to July). From August to December, they gradually decreased and then rose over summer months. On average, over two decades, the spot price of the middle month of summer, January was the highest, followed by another summer month, February and then the middle month of winter, July. The mean monthly price of January is significantly above the top edge of the box. Thus, the occurrences of extreme prices may concentrate most in January. During winter months, particularly in June and July, the dispersions of prices were higher with longer whiskers than during other months. Therefore, month or season is another factor that strongly affects the changes in electricity spot prices.

Electricity Spot Price Spikes
One of the most generic characteristics of electricity spot price is the occurrence of price spikes. As stated in Christensen et al. [17], they are not a unique feature of the Australian electricity markets but a common phenomenon of deregulated electricity markets globally. The spot price, in some cases, can jump quickly to an extremely high level or even the MPC and turn back to the average rate within a half-hourly period [15,21,25]. These jumps are called spikes. The non-storability, a vital feature of electricity, is one of the reasons that lead to the price spike occurrences [7,8,26,27]. The spikes are also caused by supply scarcity, failures in the process of electricity transmission or the sudden and temporary changes in supply or demand over severe weather events. Spiky behaviour in electricity spot prices is partly responsible for the huge volatilities in the markets [8]. The Australian electricity market witnesses spikes with higher frequency than others globally because the electricity and reserve capacity payments are not separated [14]. To achieve the goal of reduced pumping costs, wastewater pumps should not be operated during the periods with these price spikes. From 1 January 1999 to 31 June 2021, there were 965 spikes in total which accounted for about 0.24% of the dataset. Number of spike occurrences by time of the day, day of the week, month and year in South Australia during the study time period is shown in Fig. 5a-d, respectively. Figure 5d does not include 2021 as its data were not sufficient to analyse the whole year. Figure 5a shows the number of occurrences of spikes for each 30-min trading interval from 00:00 to 23:30 in a day. Price spikes' concentration occurred in the morning from 07:00 to 10:00 and in the afternoon and early evening   30), the number of spikes was very low that ranged from 0 to 13 for each half-hourly time interval and tended to decrease except the midnight trading interval (00:00) that recorded 37 spikes. The number of spike occurrences over 7 days in a week is illustrated in Fig. 5b. The price spikes occurred most frequently in the middle of the week, Thursdays, followed by Mondays with 245 and 168 occurrences, respectively. The highest number of spikes that occurred on Thursday was the reason why the mean value of this day was significantly higher outside its corresponding box as identified earlier.
From Thursdays onwards the weekends, the number of spikes had a decreasing trend to 34 occurrences on Sundays which recorded the lowest amongst 7 days.
As shown in Fig. 5c which indicates spike occurrences over 12 months of the year. January was the month with the highest number of spikes (198 occurrences), followed by February with the second highest (158 occurrences) and then July and November with the third highest (111 occurrences). These months are in summer, the middle of the winter and the end of spring in Australia. The concentration of price spikes in those months pushes their mean values up above the corresponding boxes.
In Fig. 5d, 2021 is not included as its data are not sufficient for the entire year. In descending order, 2016, 2013 and 2009 observed 96, 76 and 75 incidents, respectively, making them the three years with the highest spike occurrences. In opposite, 2003 had the lowest ranking of number of occurrences of spikes overall with 10 occurrences, with 2012 as the next lowest with 12 occurrences, and followed by 2020 with 15 occurrences.

Negative Electricity Spot Prices
In addition to price spikes, occurrences of negative prices are another outstanding characteristic of the electricity spot price dynamics which are due to the imbalance between supply and demand. The spot market allows a negative price to be bid. Producing electrical energy at negative prices, in many cases, is less high-priced than not being put into operation as generators can stay on-line to avoid the costs of shutting down and restarting the plants [21]. The trading intervals with negative electricity spot prices provide opportunities to maximise pumping and reduce electricity consumption costs.
The collected study dataset of electricity spot prices (Dataset 1) consists of 394,402 trading intervals. Zero prices were also included in the analysis. The number of occurrences of negative and zero values was 5249 which accounted for 1.33% of the total trading intervals and was equivalent to a total amount of approximately 2625 h. Figures 6a-d show number of occurrences of negative and zero prices by time of the day, day of the week, month and year in South Australia, respectively. 2021 was not displayed in Fig. 6d as there was no sufficient data for the full year.
Number of occurrences of negative and zero prices of each 30 min during the day is illustrated in Fig. 6a. The highest peaks of concentration of negative and zero prices occurred in the after-midnight time at 04:30 and in the early afternoon at 13:30 with 209 and 249 incidents, respectively. The lowest number of occurrences of negative and zero prices was 5 which was observed at midnight and 20:30.
Over a week, the number of occurrences of negative and zero prices on weekends is higher than that on weekdays (Fig. 6b). The number of occurrences of price spikes experienced an opposite trend in which they occur on weekends with lower frequencies than on weekdays. The highest concentration of negative and zero prices was on Sundays with 998 occurrences. The lowest number of those prices was 585 which occurred on Wednesdays. Figure 6c shows the distribution of occurrences of negative and zero prices per year. In general, the number of negative and zero prices in five latter months of the year, from August to December was higher than the remaining months, excluding February. The top 3 months with the highest number of negative and zero prices in the descending order were October (680 occurrences), September (613 occurrences) and February (504 occurrences). June, a winter month, observed the lowest number of these prices with 233 occurrences.
All The occurrences of negative and zero prices lower the average electricity spot prices. In particular, for the whole studied period, the average spot price of electricity in South Australia decreased by Aus$1.68/MWh by negative and zero prices. For 2020, the year with the highest number of occurrences of negative and zero prices, without them, the average price was higher by Aus$10.90/MWh. Therefore, the pump operators should take advantage of the periods of negative and zero prices to lower electricity expenses for their wastewater network.

Electricity Demand Analysis
In the electricity spot market, electrical energy supply and demand are instantaneously matched. Seasonal changes in electricity demand are reflected in seasonal behaviours of prices in the spot market [24,28]. In other words, spot price reflects how much electrical energy is being used. Figure 7a shows the relationship between two variables, electricity spot price and demand in a typical year, 2019. The electricity spot prices are in logarithmic scale on the vertical axis for a clearer presentation of extreme values. Scatterplots of the remaining years can be found in Fig. S6 a-c in the SI. The relationship between these two variables is almost linear. High and extreme electricity spot prices happen when demand increases to a higher level at about 2000 MW. Another scatterplot was used to display how electricity demand impacts spot prices for the whole studied period, from 1 January 1999 to 30 June 2021 (Fig. 7b). When electricity demand is at a lower level, price spikes apparently do not happen. On the other hand, when electricity demand is high, the relationship between these two variables is shown more clearly for one year data (2019) as in Fig. 7a.
Actual historical half-hourly electricity spot price and demand data on a typical week in Dataset 1 (9-15 July 2007) with and without outliers in the prices are shown in Fig. 8a and b, respectively. During the week, the fluctuations of prices with outliers partly follow the fluctuations of electricity demand. The linearity of the relationship between price and demand is no longer existing due to the high spot prices (Fig. 8a). The occurrences of spikes change the highly related relationship between electricity spot prices and demand to the non-related relationship and break their close correspondence, according to Vu et al. [29]. When outliers are removed, their linear relationship is stronger as can be seen in Fig. 8b.
The relationship of electricity spot prices and demand was also examined based on their half-hourly average values over 48 trading intervals in a day with and without outliers as in Fig. 9a and b, respectively. It can be seen from these two figures, when outliers or extremely high or low prices are removed, the increase or decrease in electricity spot prices tends to follow the increase or decrease in demand more closely. With and without outliers, the Pearson correlation coefficient of price and demand is R = 0.74 and R = 0.95, respectively. The R values are greater than 0 which indicate electricity spot price and demand move in the same direction. In other words, they tend to increase or decrease together. R values are also used to show the strength of their association. With outliers, there is a strong relationship between demand and price, while without outliers, a very strong relationship is indicated.

Weather Conditions
When temperatures are too low or too high, heating and cooling demand increase that leads to an increase in electricity demand and electricity spot prices. In Australia, cost of electricity generation is generally affected by world's fuel prices; however, this factor has less impact on the electricity spot prices than extreme weather conditions over summer [30]. This section investigates temperatures on days with high electricity spot prices to understand how prices are affected by weather conditions. Table 2 shows the top 15 dates that exhibit extremely positive prices within over 22 years from 1 January 1999 to 30 June 2021. Additional information regarding maximum temperature and highest price on each of 15 dates, the MPC of the corresponding financial year and the time those events happened are also provided.
Nine out of 15 extreme events occurred in the recent 5 years (2016-2021). There were two MPC events in 2019, while most of the highest spot prices of the remaining days nearly reached the MPC levels. During a day, the occurrences of extreme events were during peak hours in the afternoon and evening, while during a year, they mostly occurred in summer. More than half of the total events, eight out of 15, occurred in January, the hottest month in a year. Extreme . Especially on 24 January 2019, the maximum temperature was 45.8 °C which was recorded as the day with the highest temperature ever in history over the years.
Extreme events with maximum temperatures in 2019 are further discussed. Table 3 reveals the historical data of daily maximum temperature at Station 023,034 Adelaide Airport for 4 months in 2019, including January, February, March and December. The extreme events that occurred in 2019 with very high temperatures are highlighted in bold. Those days with extreme events were followed by 3 to 7 consecutive days with maximum temperatures greater than 30 °C. This understanding can support operators and managers of the wastewater networks in preparing an effective pumping schedule after a certain time of very high temperature days to minimise operating costs.

Discussion
This paper presents a comprehensive analysis of South Australia's electricity spot price for more than 22 years with data collected from the beginning of the NEM, 1999 until the end of the financial year 2020-2021 (1 January 1999-30 June 2021). With this long period data, a broad view on the electricity spot prices was provided. This is an attempt to model and predict the prices, and then the future forecasts can be used as input to the smart controller.
The increases and decreases in electricity spot prices during the 1999-2021 period have a strong dependence on time of the day, day of the week, month and season in a year. In a day, the prices tended to be more expensive in the early morning and afternoon throughout peak hours and cheaper during other hours of the day, especially after-midnight hours. In a week, the prices recorded on weekdays were higher than those over weekends. During a year, the prices in summer and winter increased under extreme weather conditions. The price spikes as well as negative and zero prices could occur at any of 48 half-hourly trading intervals during the day. The occurrences of price spikes are one of the main reasons that drag the half-hourly/daily/monthly average electricity spot prices up. Besides that, the number of negative and zero price occurrences had an upward trend in recent years. Therefore, it is possible to achieve cost savings in wastewater pumping operations if operators and managers take advantage of the periods at which the prices drop to under zero.
Additionally, the electricity spot prices in South Australia have high-level volatility with a wide range varying from negative Aus$1000/MWh to Aus$15,100/MWh for the financial year 2021-22. The large fluctuations of the electricity spot prices can occur over a short period of time in the market with both positive and negative prices. As a rule of thumb, pumping systems in the wastewater networks should avoid operating during high priced electricity periods as much as possible and increase pumping in lower priced hours. Besides that, the fluctuations of spot prices are also driven by changes in demand and weather conditions. When the electricity demand increases, the price increases and vice versa. The high temperatures in summer also lead to the increase in electricity prices. Therefore, the wastewater network operators should consider the electricity spot pricing with those influencing factors to decide the appropriate pumping schedules to reduce the operations costs.
The electricity price fluctuation every half-hourly time interval of the spot pricing potentially offers more opportunities to lower the costs of the pumping system than normal electricity single rate or time-of-use tariffs. For the single rate tariff, consumers are always charged at one fixed rate. Hence, it cannot offer monetary savings by operational changes. For the time-of-use tariff, each charging block, such as peak, off-peak and shoulder time, has its own rates, and the price only changes once every few hours. In this arrangement, cost savings may be possible during off-peak blocks that offer lower prices. For the spot pricing situation, it is not an ideal way to operate by turning the pumps on/ off according to the fluctuations in spot prices every 30 min as it could accelerate the deterioration of pumps. Additionally, if pumping is stopped during a long high-priced period for cost saving, sewage accumulates in the wet well that could lead to overflow. On the other hand, if the pumps are continuously operated during a long low-priced period just for the lower cost, unnecessary pumps usage/waste of electrical energy may be resulted when the wet well is empty. Therefore, to establish pump schedules for the wastewater network, sewage levels in the wet well should be integrated with electricity spot prices. These two parameters should be divided into ranges representing different levels. For example, the electricity spot price ranges could be Low, Medium and High and the sewage levels Low, Low-Medium, High-Medium, and High [10]. Ranges of these two parameters are then combined to set up the rules to operate pumps. The rules ensure when wet well level is high, wastewater is released to prevent the risk of spills, while when wastewater is close to empty, pumps are deactivated to protect pumps from running dry and waste of electrical energy. Further details on these pump control rules can be found in [10].
Our local water utility, SA Water, has experience in using electricity spot prices to manage their system operations. In South Australia, SA Water is one of the largest business electricity consumers which owns, operates and manages huge water and wastewater networks. To maintain essential services to customers, those networks require high electrical energy usage. Currently, as a self-retailer, SA Water directly purchases electricity from the NEM for their operations. There is a journey for SA Water to become a self-retailer. It was transitioned via stages from a large retail customer. Before 2013, SA Water was a large retail customer which got benefits from curtailing load and the electricity prices were tailored fixed by negotiations. From 2013 to 2017, SA Water moved to operate under a spot price pass through model and exposed to spot market prices with fixed price and fixed volume hedge contracts. In 2017, SA Water registered to be a participant in the AEMO, also known as market customer and had to manage risks in the market itself. Since 2020, SA Water has become a registered self-retailer with AEMO which retails electricity from the NEM to internal customers only according to the load requirements. The operations of SA Water's networks including wastewater pump stations is relevant to and strongly dependent on the dynamics in NEM. Therefore, understanding the electricity spot price behaviour in NEM is crucial to achieve energy cost savings for pumping system in the wastewater networks. The predictions of electricity spot price in South Australia should be integrated as part of the generating pump scheduling process. The use of electricity spot prices in realtime control has benefitted SA Water in the operations of different systems. For the drinking water distribution network, the Distribution Optimisation Tool (DOT) has been used to optimise operations of the network with respect to cost regarding electricity spot price. Forecasts for a short-term period of 2 days ahead of electricity spot price are provided by AEMO, and long-term forecasts can be obtained from the forecasting model developed by SA Water [31]. This tool with predictions of electricity spot prices could achieve Aus$400,000 saving over a six-month period [32]. Another case in which SA Water also achieved cost savings by considering electricity spot price is related to the North South Interconnection Scheme that transfers drinking water from the south to the north of Adelaide (capital city of South Australia). With a comprehensive understanding of high and low, peak and off-peak electricity spot prices, the pumping activities were appropriately arranged to achieve cost savings [33]. From the evidence of the benefits of using the electricity spot market, it is necessary to include forecasts of electricity spot price in South Australia for controlling pumps of the wastewater network. In future operations, these data will be used to set up the smart controller schedules in advance to ensure services are delivered effectively even without knowing the actual price in real-time during operations.
The design of this study has some limitations that should be considered for future research. Three electricity spot price characteristics were analysed because the study purpose is to investigate the price difference between lengths of time (e.g., month, week, day, half hour). Findings from this research can pave way to model and forecast electricity spot prices; however, this is out of the study scope. Future research should examine two other characteristics including mean reversion and high volatilities to achieve comprehensive understandings of electricity spot price behaviour. It would benefit the process of generate future spot price datapoints to be used in controlling wastewater pumps in real-time. In additional, there are several detection methods for the price spike events; however, this study only applied the one using mean and standard deviation of the dataset. This method was selected because it was based on statistical parameters, so provided the best numerical description of the dataset and clearly defined its structure and properties. Two other approaches based on exceeded values to a price threshold should be conducted, including (1) fixed price threshold method for which Aus$100/MWh is the often-used threshold in literature [14][15][16][17][18]; and (2) variable price threshold method such as percentage threshold for which the largest 1% of the observations is considered [19]. A comparison between the frequency of the occurrences of price spikes for each detection technique should be conducted to further examine patterns.

Conclusions
Wastewater asset management strategically focuses on reducing electricity costs used for pumping sewage from multiple sources to the treatment plant. The optimal pump schedules can be established by integrating pump operations with electricity spot prices to take advantage of the cheaper periods on tariff and avoid the expensive periods if possible. The dynamics of electricity prices in the NEM spot market in South Australia were investigated to explore opportunities to obtain electrical energy monetary savings. A dataset of half-hourly electricity spot price for more than 22 years from 1999 to 2021 was employed to identify key characteristics of electricity spot prices. Results show that multi-scale seasonal components significantly drive the changes of the electricity spot prices. Particularly, the spot prices were higher during peak hours, weekdays and extreme weather seasons (summer and winter) compared to off-peak or shoulder hours, weekends and other seasons in a year, respectively. The occurrences of spike and negative prices at any time interval also contribute to the increase and decrease of the average price. Besides, electricity spot prices have a strong positive correlation with demand and heavily affected by weather conditions, especially in summer. Electricity spot price forecasts can be beneficial for controlling wastewater pumps in real-time. The integration of forecasted electricity spot price as a key input of the pump controller could increase the quality of operations optimisation and contribute to the monetary savings of wastewater utilities. Therefore, comprehensive understanding of the fluctuations of electricity spot prices is required to generate a high-quality forecasting model that is well modelled with all situations covered. Key characteristics of electricity spot prices should be considered as components of the forecasting model to capture their behaviour. Furthermore, influencing factors on electricity spot prices including demand and temperature also should be included to improve the accuracy of the forecasting model.