Time Series Analytics (TSA) is a set of statistical methods to analyse time-series data in order to extract relevant patterns to help predict future behaviour. Waylay offers a powerful Time Series Analytics Module that automates much of the data science tasks behind TSA and enables users to immediately deploy analytical models in production. In today’s post, we look at how TSA helps a precision fishing farm to optimise the yield for their fish production.

Start with the basics, what impacts farm production yield?

One of the biggest factors impacting the farm’s yield is the water quality in the fish tanks. The water quality is measured with specific IoT devices installed in the fish tanks which provide time-based metrics on water attributes such as: pH, temperature, dissolved O2 and more. There needs to be a delicate balance between all of them at all times in order to ensure the impact on the growth of the fish is kept within desired ranges.

Another important factor is the food quality and quantity and the feeding schedules of the fish. If fish are overfed, food is wasted, money is lost and fish health is at risk. If they’re underfed, it will negatively impact fish growth. It’s important therefore to also optimise the feeding process.

What is IoT data analysis expected to deliver?

Once the factors that most impact the yield are identified, there is a clearer, albeit still generic understanding of the type of goals that data analysis should achieve. The fish farm is therefore looking at using their IoT device data to:

  • monitor water quality
  • optimise feeding schedules
  • raise alarms when conditions fall below optimum
  • steer aquaculture equipment
  • reduce energy consumption

Fish farm

How can the farm’s objectives be achieved with time series analytics?

The use cases have been defined starting from a number of frequent business scenarios described by the marine engineers and operations managers of the farm.

  1. Anomaly detection – A water pump failure may indicate a posisble blockage, in which case the farm’s operations manager needs to be notified so they can immediately intervene.
  2. Outlier / anomaly detection – Sudden low water pH levels indicate increased acidity and should prompt the pump to automatically pump more oxygen into the water until it reaches the desired levels.
  3. Seasonality pattern – Changes in the normal daily fluctuations of water pH levels as influenced by light levels may indicate a bigger issue that can impact the health of the fish (light sources are blocked, presence of microorganisms in the water). In this case, the engineers or farm mechanics should be alerted to further investigate the fish tanks.
  4. Forecasting / time-to-target prediction – For the automated feeding machines that the farm is using for each fish tank, it would be useful to know when the machines need to be replenished so that new orders are placed in time and there’s no risk of inventory interruptions.

How to create an anomaly detection model and deploy it in production in 5 minutes, with Waylay TSA

Let’s take the first scenario that we described above, alerting the operations manager when there’s a water pump failure, and go step-by-step to see how you can achieve that, from training the model on historical data to applying it in production to real-time sensor data, in just 5 minutes.

Watch the demo video or follow the step-by-step text description below.

  1. Open the TSA Designer from the Waylay management console, after you log in your Waylay environment.
  2. Select the resource (ie: IoT device) for which you want to analyse the data and build the analytical model, in our case the water pump that pumps oxygen in the fish tank.
  3. Explore/inspect the historical data from the device and define what is the normal behaviour for the water pump over a specific period of time. This normal behaviour in our case translates into number of rotations per minute.
  4. Choose an algorithm to express the normal behaviour or let Waylay TSA auto-magically choose it for you. It does this by analysing the data set that you selected and looking for specific patterns. We have a set of typical off-the-shelf algorithms (arima, sarima, ols etc.) or you can add your own Python algorithm.
  5. Create the model by applying the selected algorithm to your preferred data set. Waylay TSA calculates that the water pump’s normal functioning is at around 600 rotations per minute, with an expected deviation range of +-100rpm (so as low as 500 or as high as 700 rotations per minute is still within normal range).
  6. Test the model by applying it to a data set with known anomalous behaviour. It should flag all data points outside the normal range as anomalies.
  7. Save the configuration and store it as an anomaly-detection model for the water pump rotation.
  8. Put the model in production by going to the Rule Designer straight from the TSA Designer to create a business rule with your newly created model as a sensor input. Set your rule to automatically send an SMS to the operations manager as soon as an anomaly is detected.
  9. Deploy and execute in real-time or periodically. The model you’ve just created in the TSA Designer is now being applied on real-time data coming from the water pump. As soon as the model finds and flags an anomaly in the real-time data, it will alert the operations manager.
  10. Change the analytical model at any time without impacting production, the business rule will also be automatically updated in real time.

Want to know more? Have a look at our extensive technical documentation page, or watch our TSA webinar.