Creating self-diagnosing cars with tinyML

Nov 21, 2023 by Mattias Hellerstedt, Dr. Vladimir Todorov



In brief

  • Traditional maintenance models in automotive are outdated and inefficient for modern vehicles. Predictive maintenance (PdM) is the solution, but it is hard to achieve 
  • tinyML allows for the deployment of complex machine learning models on small and cheap hardware, such as microcontrollers, enabling cost-effective PdM in the automotive industry 
  • Using tinyML for PdM leads to improved customer satisfaction, reduced warranty claims and a leaner and better-planned service infrastructure 



Gone are the days when a car was simply a pure transportation convenience. Scientific developments and advances in technology have transformed the car into a human-centric digital experience. With software-defined vehicles (SDVs) quickly becoming the norm for the automotive industry, the possibilities for the future of automotive are growing significantly. New capabilities touch on many aspects of the vehicle — from vital cybersecurity to cool HMIs — with the chance for exciting user experiences and increased safety. This blog explores a topic that is associated with both of these areas — predictive maintenance. The ideas we’ll discuss can make car driving both safer and more convenient. 


Software-defined vehicle data


The technological advancements of recent years have brought the automotive world much closer to the world of robotics and automation. SDVs are packed with tons of sensors and actuators all working in unity — technology designed to ensure a smooth and enjoyable ride, while also providing a source of tremendous amounts of data. This data can be further processed, analyzed and converted into customer and business value, especially when combined with state-of-the-art machine learning and artificial intelligence (AI) algorithms. One popular, but still not yet widely adopted, use case of vehicle data is predictive maintenance (PdM). 


Fig 1. The software-defined vehicle is data-driven 


Traditional maintenance


It’s dreaded but has happened to most car owners: An unexpected breakdown. Unfortunately, it is typically quite hard to calculate when a certain mechanical element or whole machine could fail. Traditionally, this estimate is addressed in a very centralized manner — either data from multiple sensors is collected and analyzed at a central, powerful machine learning processing unit, or the suspected parts are assessed at regular intervals (as done in the aviation industry). However, as cars continue to evolve, the amount of data they create grows beyond the limits of these traditional tests. In other words, our hitherto approaches to estimating vehicle (or vehicle parts) failure are not easily scalable, require too much data to be transferred, or are too mundane and expensive to execute often enough. Consequently, traditional approaches will soon fail to cover the majority of possible use cases. 


Better maintenance


Imagine a system where each mechanical part is able to report its state and potential need for maintenance — essentially, a distributed PdM system — a car that tells you how each of its parts are performing and if any of them should be checked or replaced. Such a system would remove the anxiety of not knowing if your car is likely to break down, and it would improve the safety of passengers and road users in general. So, what’s the problem? Until recently, cost and performance. Such systems were prohibitively expensive, but with the advancements of edge computing, this may not be the case much longer. By using tinyML — an edge computing approach for deploying complex machine learning models on small and cheap hardware like microcontrollers — PdM machine learning models can be built and deployed to individual mechanical components at a significantly reduced cost. In addition to the benefits this would bring end users, the business value for the automotive industry is very promising too: Example applications include optimization of spare parts distribution networks; and great reductions in diagnostics and service times and costs.   


Fig 2. Vehicle reliability depends on accurate predictive maintenance algorithms 


What is tinyML?


tinyML (Tiny Machine Learning) aims to make advanced computer models smaller and simpler so they can work well on devices with limited resources. This way, they can still perform accurately without using too much power or compute capacity. Let’s take a deep dive into the topic — data analytics, artificial intelligence and machine learning rely on complex and heavy computational models that work on large data sets and streams to obtain useful predictions and insights. Such models can be trained using data from the sensors and cameras present in modern cars. The training consumes a lot of compute power, requires lots of data from different vehicles, and usually cannot be performed within the vehicle.  

However, once trained, these models can be run and used in vehicles. Moreover, they can be used in multiple locations within the vehicle and run in parallel. This is where tinyML comes in: It slims down and reduces complex pretrained computational models without significantly impacting their accuracy, enabling their use on resource-constrained edge devices. How does it work? It uses tools to prune and quantize (approximate a digital representation on values to introduce limits on their range) the models effectively, reducing their complexity. The model is then optimized and deployed on hardware several orders of magnitude cheaper than the one used for the training.  


Fig 3. Implement machine learning in the vehicle using tinyML  


tinyML in practice: PdM in automotive


By using the tinyML processes and algorithms, a multitude of powerful, but easy to execute, models can be forged and distributed throughout the car in a cost-efficient manner. The data generated by accelerometers, cameras, microphones and other sensors can then be processed in real-time. Having multiple models working in parallel allows for accurate insights into the vehicle’s current health as well as for predictions of future states.  

This makes tinyML especially useful for in-vehicle predictive maintenance. Since cars are complex machines featuring many attached, interlocked and moving physical parts, they are prone to wear and tear: As we all know, they require regular maintenance and sometimes suffer from unexpected failures. 

By coupling sensors with appropriate tinyML-created models and distributing them to various parts throughout the vehicle, insights on upcoming failure or maintenance needs can be predicted long before they become an issue. tinyML can bring intelligent predictions to individual components or moving parts and enable them to self-diagnose or even self-heal.  

Here are some examples: 

  • Wheel vibration analysis — by attaching an accelerometer to each wheel of the car, the performance can be tracked and any damages to the wheel, or its suspension, can be detected before it becomes obvious to the driver or to a professional mechanic 
  • Engine sound analysis — microphones can be used to track the operating sound of an internal combustion engine to analyze sound anomalies and detect potential problems long before the gravity of the situation increases 
  • Underside damage image analysis — cheap low-resolution cameras can be used to track damage on the underside of the vehicle, constantly checking for leaks and cracks, essentially reducing the chance of a catastrophic failure 


PdM: A predictable advantage


In addition to providing car users with the peace of mind of having a constantly checked, reliable car, the business value of in-vehicle machine learning in the automotive industry is enormous: It allows for the introduction of powerful, low-cost AI on a component level. In turn, you can achieve on-the-fly tracking and understanding of the vehicle’s performance. You can also detect potential failures and maintenance needs early, allowing for a leaner and better-planned service infrastructure that has a better focus, lower operating costs and minimized delays. Moreover, achieving self-healing cars means that sometimes all you need is an automatically tweaked configuration change to solve or prevent an issue. 

As a full-service technology partner with unmatched experience in advanced diagnostics and data science in the automotive industry, Luxoft is uniquely positioned to help automakers achieve their predictive maintenance ambitions. Contact us for a free consultation or to know more about how we can support your maintenance projects. 


Mattias Hellerstedt , Head of Data Science and AI

Mattias Hellerstedt author linkedin

Head of Data Science and AI

As Solution Director at Luxoft Automotive, Mattias oversees the portfolio of Data Science related capabilities. He leads a team of experts that works collaboratively with Luxoft’s many automotive software solutions in order to develop new data-driven value streams, smarter vehicle functions and safer cars. Previously, Mattias worked for a large IT outsourcing company for 20 years where he gained a unique insight into the IT-related challenges large enterprises face and what it takes to solve them. He is married with a son and spends some of his spare time windsurfing, skiing or writing bespoke code to automate his home.

Dr. Vladimir Todorov , AI Strategy Consultant

Dr. Vladimir Todorov author linkedin

AI Strategy Consultant

Vladimir is a freelance consultant who helps companies uncover the potential of artificial intelligence, machine learning, and data science to unlock business value both internally in their business processes and organizations, as well as in their products and services. At Luxoft, he helped shape the data science and AI capability that combines our vast automotive domain expertise with the power of machine learning. Vladimir has extensive technical and business experience having previously worked in a management consulting firm, as well as in the semiconductor industry. He holds a Ph.D. in Electronic Design Automation and an MBA in Innovation and Business Creation.

Mattias Hellerstedt , Head of Data Science and AI

Mattias Hellerstedt author linkedin

Head of Data Science and AI

Dr. Vladimir Todorov , AI Strategy Consultant

Dr. Vladimir Todorov author linkedin

AI Strategy Consultant