Across the globe energy systems are changing, creating unprecedented challenges for the organisations tasked with ensuring the lights stay on. In the UK, National Grid is facing shrinking margins, looming capacity shortages and unpredictable peaks and troughs in energy supply caused by increasing levels of renewable penetration. Open Energi uses its IoT technology to unlock demand-side capacity - from industrial equipment, co-generation and batery storage systems - creating a smarter grid; one that is cleaner, cheaper, more secure and more efficient.
I'll talk about how we use Apache Nifi to orchestrate and coordinate Machine Learning microservices that operate on streams of data coming from IoT devices, providing a layer of fault-tolerance and traceability. With built-in retry logic, backpressure and clustering, Nifi helps us keep hard problems away from our code. It comes with processors that integrate with our cloud provider of choice (Microsoft Azure), fitting seamlessly into our processing pipeline.Finally, its straightforward graphical interface makes it easy enough to use that any team member can step in and troubleshoot a flow with little training.
12. Our Data
• ~20k telemetry messages/second
• ~5k messages/second report a change of state that requires
secondary processing (eg. validating forecast)
• Most messages require aggregation for reporting purposes
13. Why Apache Nifi?
• Data provenance
• Built-in mechanism for backpressure and fault handling
• Easy to use
• Built-in processors for Azure services
• Easy to extend
• Performance not our main concern, but nice to know that it
scales
14. Downsides
• Source control of flows – possible but diffs not very readable
• Automated flow testing and CI still remain difficult
• Script components not easy maintain
• Not all processors work in clustered mode
22. Observations
• As practical/maintainable as the HTTP service
• Where did all the logic go? This is boring!
• Why use Nifi at all?
– Traditional stream processing (eg. Storm)
– Serverless (eg. Azure Function)
We are trying to improve the efficiency in power networks. About 20% at the time of the first power station – still only about 25% now.
The under-utilisation is even worse for renewables! Consumers end up footing the bill for this chronic inefficacy.
Why? Because we think we can’t control demand, so we have to over-supply in case of spikes…
Let’s control demand!
The gateway contains hard-coded information on the assets it controls, sensors that help it tell when the asset has stored energy and constraints (such as peak tariff avoidance), enabling it to dispatch them when grid frequency is too low or too high.
The aggregation means that each asset need not be a proportional control to grid frequency, but remains free to perform operational duties 94% of the time – our service is invisible to the end customer (except for the monthly checks).
Dynamic Demand can deliver approx £85,000 per MW/Yr
FCDM / Static FFR £22,000 - £26,000 per MW/Yr
STOR - £10,000 - £15,000 per MW/Yr
- Open Energi is turning the energy system on it’s head, so that instead of supply adjusting to meet demand, demand adjusts to meet supply
By harnessing small amounts of flexible energy demand from energy-intensive equipment we can create a virtual power station and displace fossil-fuelled peaking power stations
This is enabling a user-led transformation in how our energy system works, so that businesses and consumers are not only making it happen, but also seeing the benefits
It’s a vital part of our transition to a zero carbon economy because we cannot maximise our use of renewables unless our demand for energy becomes more responsive
Basically, we’re 20x cheaper than building a new power station because we just tap into existing infrastructure.
This is not huge data on its own, but
Low latency requirement for aggregations
One message can feed into multiple streams
There are ongoing discussions to improve flow testing, CI and source control.
This is only one half of the flow!
To the third point, using Nifi gives better traceability, instantaneous feedback on pipeline health (i.e. metrics) and a simple UI.
Timeframe for all this – minutes to hours.
As an output of the PostHTTP processor we get not only the forecast but also expectation of error. We keep track of the accumulated square error, so that we can have a single “reduceable” map key in the distributed cache.