How Octave Achieves a High Compression Ratio and Speedy Queries on Historical Data While Revolutionizing the Battery Market
This is an installment of our “Community Member Spotlight” series, where we invite our customers to share their work, shining a light on their success and inspiring others with new ways to use technology to solve problems.
In this edition, Nicolas Quintin, head of Data at Octave, shares how the company migrated from AWS Timestream to Timescale in search of a more mature and scalable database and is revolutionizing the battery market by improving the battery systems’ safety and predicting maintenance needs.
To do so, the Octave team collects and analyzes millions of data points daily while dramatically saving disk space (their compression ratio is 26.06!) and delivering speedy queries on historical data on client-facing applications. How do they do it? With a little help from Timescale's compression capabilities and continuous aggregates.
About the Company
Octave is a cleantech company based in Belgium that gives electric vehicle (EVs) batteries a second life. We develop energy storage systems by repurposing used lithium-ion (Li-ion) batteries and transforming them into smart, sustainable assets to store the excess wind and solar energy.
Batteries from an electric vehicle are typically retired when their usable capacity has decreased to roughly 80 percent. Octave gives these batteries a new life through smart solutions for stationary energy storage, for which demand is rapidly growing. This way, we can save resources and raw materials that would be traditionally used to produce new batteries.
Octave’s batteries are suitable technologies for small and medium-sized enterprises or industrial sites looking to optimize their energy management or decrease their electricity bill amid the record-high energy prices in Europe.
More specifically, Octave’s sustainable energy storage system allows customers to increase their self-consumption and cope with the intermittency of renewable energy sources. It also enables customers to participate actively in the energy markets, becoming more independent from energy suppliers, fossil fuels, and grid operators.
About the Team
We’re currently a team of around 10 people working on everything related to electrical and mechanical design engineering, embedded and software engineering, and business development. We’re growing fast!
As the head of data, my role at Octave is to collect data from the edge devices, store them in our databases, develop data pipelines, improve and optimize the battery state algorithms through big data analytics, and present actionable insights in dashboards. Finally, I also ensure that this entire process happens seamlessly.
About the Project
Octave distinguishes itself from traditional battery suppliers by leveraging the plethora of data and measurements from the battery system and building up an extensive history of each battery cell.
We handle large streams of battery measurements with clear time-series characteristics: each data point is composed of a timestamp and a value. These data are collected from the battery systems (our IoT edge devices) and sent back to our cloud for further analysis.
Among the information we collect, the most basic yet crucial data points are undoubtedly the voltage and temperature measurements from each battery cell in operation.
"We initially used AWS Timestream in the early days of Octave, which at first seemed a natural choice to handle our time-series data since our cloud infrastructure was entirely built in AWS. However, we quickly realized we would need a more widely used, mature, and scalable database solution"
The data are streamed back to our Battery Cloud (our in-house developed cloud platform, hosted on AWS and relying on Timescale databases), where they are crunched and further processed. This allows us the following:
- Analyze the battery cells’ behavior and degradation based on their history and how they are cycled (the temperature, current levels, and depth of discharge significantly impact the lifetime of batteries!).
- Improve the safety of the system by immediately detecting anomalies.
- Implement a data-driven predictive maintenance process. The ultimate goal is to predict when to replace a used battery module, and by doing so, we can extend the lifetime of the entire system. This is a true game-changer for second-life battery systems.
Choosing (and Using!) TimescaleDB
I have been using PostgreSQL for some time, and we were keen to use tools and stacks we were familiar with for the sake of efficiency. So inevitably, I was immediately interested when I heard about an interesting PostgreSQL extension called TimescaleDB, specifically built to handle time-series data, which we knew we needed since we were dealing with a typical IoT use case.
"Timescale has proven to be a key enabler of Octave’s data-driven Battery Cloud technology"
We initially used AWS Timestream in the early days of Octave, which at first seemed a natural choice to handle our time-series data since our cloud infrastructure was entirely built in AWS. However, we quickly realized we would need a more widely used, mature, and scalable database solution if we ever wanted to scale our operations and deploy several dozen or hundred second-life battery systems in the field. So, we went looking for alternatives.
After some research, Timescale quickly became our preferred option, given its impressive compression ratios, lightning-fast queries, unmissable continuous aggregates, friendly community and extensive documentation, and most importantly, its plain PostgreSQL syntax.
The cherry on the cake is Timescale's ease of use and user-friendly interface.
We went immediately for Timescale because we were looking for a managed service, and Timescale seemed the recommended option and was nicely compatible with our preferred AWS region.
We have found TimescaleDB’s compression ratio to be absolutely phenomenal! We’re currently at a compression ratio of over 26, drastically reducing the disk space required to store all our data.
The power of continuous aggregates is hard to overstate: they are basically materialized views that are continuously and incrementally refreshed and allow for lightning-fast queries on large historical datasets.
I have found the documentation to be very clear and abundant. Every feature is very well explained. So it’s very easy to get started with TimescaleDB. And if we have more precise questions specifically related to our use case, we can always rely on our customer success manager or the very reactive Support Team. 🙂
Current Deployment & Future Plans
Most of our backend software is currently written in Python. We leverage AWS IoT to manage our battery fleet and circulate the data between our edge devices and our battery cloud via MQTT.
We rely on some ETL (extract, transform, load) pipelines interacting with Timescale that extract battery measurements and insert the processed data back into the database. We also use some dashboarding tools, such as Grafana and Streamlit, as well as API endpoints connected to our Timescale database.
It’s no secret that time-series data can grow very fast. We currently store close to one million data points per battery system daily. As we have already sold our first 28 battery cabinets, the size of our database is expected to increase quickly. This is only the start, as we expect to triple or quadruple sales by the end of 2023.
So far, we have found Timescale to be powerful, scalable, and pretty well-suited for our application. Timescale has proven to be a key enabler of Octave’s data-driven Battery Cloud technology.
We have started to leverage the power of continuous aggregates. For example, continuous aggregates are queried behind the scenes of our customer-facing applications. They enable our clients to quickly and seamlessly inspect and download historical data of their second-life battery systems.
SELECT time_bucket(INTERVAL '15 min', time) AS bucket, bms.iot_thing, bms.iot_device, bms.name, bms.string, bms.module, bms.cell, avg(bms.value_real) AS value_real, last(bms.value_str, time) AS value_str FROM public.bms GROUP BY bucket, iot_thing, iot_device, name, string, module, cell;
We are very proud and honored to recently have won the competitive call from the EIC Accelerator, led by the European Innovation Council! We’re now working towards industrializing and scaling our battery cloud technology.
Advice & Resources
I believe that getting started with a hands-on example is always a good way to evaluate something. You can try Timescale for free with a demo dataset to get acquainted with the service. So I recommend quickly spinning up a first TimescaleDB instance and having fun playing around with the service.
Also, there is very extensive documentation and tons of examples and tutorials available on the website, which helps you quickly master Timescale! So make sure to have a look at the website.
Anything else you'd like to add?
Thanks to Timescale for this opportunity to share our story and our mission at Octave!
Want to read more developer success stories? Sign up for our newsletter for more Developer Q&As, technical articles, tips, and tutorials to do more with your data—delivered straight to your inbox twice a month.
We’d like to thank Nicolas and all the folks at Octave for sharing how they’re leveraging continuous aggregates and Timescale’s compression powers to handle their millions of battery cell data points daily.
We’re always keen to feature new community projects and stories on our blog. If you have a story or project you’d like to share, reach out on Slack (@Ana Tavares), and we’ll go from there.