Skip Navigation
BlackBerry ThreatVector Blog

When Power Equals Distance

AUTOMOTIVE / 04.28.21 / John Wall

Electric vehicles (EVs) are becoming increasingly popular, with many manufacturers currently offering a diversity of options. Dozens more are expected to hit the market over the next few years.

A Consumer Reports survey from 2019 concluded that 63 percent of prospective car buyers in America are interested in electric vehicles. However, research also indicates that range anxiety remains a top concern. According to car ratings site JD Power, studies show that range and a lack of charging infrastructure are the primary reasons people do not consider EVs when buying a new vehicle.

The hard truth is that most currently available EVs can only travel half the distance of a gas-powered car and may have difficulty conserving battery power when driven at highway speeds.

Since the more power an EV uses for electronic systems, the less it has available for propulsion, improving overall energy efficiency is a top priority for EV makers. However, minimizing power consumption across all vehicle systems can be a challenge to achieve. 

One way to keep power consumption to a minimum is through software, and that’s where BlackBerry® QNX® helps. Although all car software is unique, BlackBerry® QNX® Professional Services has a team of highly experienced engineers who know how to craft software that won’t needlessly use excessive power. Throughout this blog, we talk about a few of the software solutions and programming techniques that the team uses to help make a big impact on an EV’s battery life.

Start with Design

Software engineers have a variety of software design techniques at their disposal to reduce an EV’s power consumption. The best place to start is at the planning stage with a power architecture. This makes everyone on the team aware – from device-driver developers to GUI designers – just how much battery power they have to work with from the get-go. Every module’s developers may not always be able to constrain their software within their allocated power budget, but if they know what it should be and have tools to measure it, any excessive power consumption can be identified early in the project when it’s easier to put a creative solution into place.

Shrink the CPU’s Drain

Beyond a power-aware design and component budgets are many specific programming tactics. As an automotive module’s CPU requires a lot of power, taking advantage of a processor’s run-time power modes is an easy and productive way to scale down power consumption. The most common technique is using idle mode, which consumes substantially less power than when the processor is actively executing instructions. Idle mode shuts down the instruction-executing portion of the processor while all peripherals and interrupts remain powered and active. This is a feature built into the QNX® Neutrino® RTOS and the QNX® OS for Safety.

Frequency scaling and power scaling are two other techniques. When the CPU is running at a slower frequency or a lower voltage, it uses less power. Having an OS like the QNX OS for Safety that can recognize when it needs less CPU power and scale back either speed or voltage accordingly is important.

In the multi-core systems that are becoming the norm in automotive designs, architects can also decide to occasionally shut down some of the CPU cores and multi-threading units. In this case, one core (or more) is left active to run critical tasks.

Events Are Good (in Moderation)

One of the most classic power saving techniques has never gone out of style: never poll, always use events. Polling is when an application constantly inquires status to determine if an action needs to be done. For example, a car may need to pull up a climate control screen if the HVAC button is pressed. It’s bad design to continually keep checking the hardware register that indicates the button contacts are closed – in other words, polling – since it uses up so much power. Whenever software is polling, it should be converted into an event-based notification instead to conserve power.

In this case, you could tie the button to an interrupt so the CPU can trigger a software event the instant the button is pressed, but spend zero time on it otherwise. Since polling is so easy to implement, yet so wasteful of battery life, it’s something to carefully avoid.

Another technique to consider is event reduction, which attempts to keep the processor in idle mode as long as possible. This means CPU-waking events are slightly delayed or accelerated so that they occur at the same time. This allows the CPU to wake once rather than several times, saving a great deal of power by avoiding excessive wake/sleep cycles. Other changes can be implemented by analyzing code and system requirements to determine if process interrupts can be altered to the same rate, or to synchronize timing of background tasks.

Optimization: Not Just for Speed

Optimizing software performance is another area. Software that runs faster or finishes its tasks sooner will generally consume less power. Sometimes this optimization can be achieved by simple compiler switches; other times it may take careful algorithm replacements. A profiler can be helpful in indicating where processing time is being spent, and BlackBerry QNX provides a system profiler that can examine processing behavior across the entire running system.

Even making the application use less memory can save power. Having the application use less memory during run-time allows more of the active memory to be kept in CPU caches. It also makes it faster to move data structures around in memory – both of which use less power.

Architectural changes can save power too – for example, by caching frequently accessed data structures within the application, many disk accesses can be eliminated, speeding up the software and reducing the need to access flash storage.

Turn Off Everything Else

Most embedded peripherals on a system-on-a-chip (SoC) have their own power controls. If the top-level application software is intelligent about power, it can maximize power use with the knowledge about how the system is being used. For example, you might opt to have the WiFi default to power down and reenable it with a touch-screen button rather than keeping it powered up all the time. Or if a Bluetooth® phone isn’t present on vehicle start-up, assume that one won’t be introduced while driving and turn off the chip’s Bluetooth receiver.

Many chips (or subsystems on the SoC) will power on assuming maximum speed and capability. Carefully examining these and turning them to power-sipping modes, turning off unused pins, or reducing the default data rate can save energy.

Extending Battery Life Takes Work

There are many highly technical considerations to building a functional, yet battery-efficient electric vehicle. Strong battery performance comes from the hard work that goes into design development, software choices, and numerous techniques.

The BlackBerry QNX Professional Services teams has a great deal of experience working with EV manufacturers to develop whole-vehicle power management systems that help avoid poor range performance, extend battery life, and increase range. These are a few reasons why 23 of the top 25 EV OEMs choose our team and software. Read the white paper Why BlackBerry QNX Has Become a Leading EV Automotive Software Supplier to learn more.

John Wall

About John Wall

Senior Vice-President at BlackBerry and head of QNX.

John is responsible for the planning, design, and development of QNX Software Systems (embedded software) and Certicom (cryptography applications).

John has been an integral member of the BlackBerry QNX team since 1993. He has held a variety of roles within the organization, including Vice President of Engineering and Services. He holds a Bachelor’s of Engineering, in Electrical and Electronics Engineering from Carleton University in Ottawa.