N-iX rewrote the client’s battery management algorithm from scratch to prepare it for use with microcontrollers. First, our experts optimized the algorithm calculations using Python as the most efficient language for the task. We then compared the newly-optimized algorithm to the original one and found that the optimization caused the solution that used the algorithm to require the least possible amount of memory and resources. The number of required calculations was also reduced, leading to faster and error-free performance.
The next step was to rewrite the already optimized algorithm calculations from Python to C to make it compatible with the microcontrollers of the embedded systems. Our engineers wrote the code using C with no patterns, frameworks, or libraries, since the code had to be set up on different microcontrollers, which posed an additional technical challenge. We have also transferred floating-point operations into fixed-point to ensure smooth optimization. This entire process was completed in a short span of time, allowing the customer to reach meet their business requirements.
By optimizing the algorithm calculations in both Python and C, we have implemented a separate Basic Algorithm solution that calculates basic battery capacity values (for example, state of risk, etc.). Basic Algorithm was released to production and integrated for a large automotive customer, and our team has provided support for the solution.
Additionally, we have implemented a desktop application for running the algorithm. We have worked on making it portable (to enable launching and running on different platforms) and transferring it to Docker (to be able to run it in the cloud). This, in turn, would expand the solution’s customer reach.
Finally, the N-iX team has helped integrate hardware by customizing the algorithm based on the specific microcontrollers and compilators of their customers.