HotCarbon 2024

CO2CoDe: Towards Carbon-Aware Hardware/Software Co-Design for Intermittently-Powered Embedded Systems

Phillip Raffeck (Friedrich-Alexander-Universität Erlangen-Nürnberg (FAU)), Sven Posner (Friedrich-Alexander-Universität Erlangen-Nürnberg (FAU)), Peter Wägemann (Friedrich-Alexander-Universität Erlangen-Nürnberg (FAU))

This transcript was made by AI. The open source speech recognition model Whisper (large-v3-turbo) transcribed the recording with faster-whisper. Names and technical terms were checked against the paper, but it can still contain mistakes. The recording is the reference.

0:00 Hello, I'm Phillip and I'm going to present to you CO2CoDe, our work towards carbon-aware hardware/software co-design for intermittently powered embedded systems. We'll first have a look at the systems we target. These are embedded systems making use of devices to collect information about the environment or communicate. These systems can either be battery powered or, as will be the focus of this talk, harvest their energy from the environment and use capacitors as energy storage. These systems are small, cheap to produce, so we can deploy them in large numbers. But before we do so, we should take a step back and think about the ecological impact of such systems. There are many ways to measure the ecological impact and for this talk we'll focus on the global warming potential, which is usually measured in carbon dioxide.

0:53 There are also many ways to look at the life cycle of a system and we'll focus on the cradle-to-gate view. For the energy storage component of the system, this can make up a significant part of the overall global warming potential. And we'll have a look at how we can minimize this impact. First we have a more detailed look at such a system. On the hardware layer, we have means for energy harvesting and we have capacitors for energy storage. Unfortunately, real capacitors are not ideal capacitors as we know them from a physics textbook. For example, we have a parallel resistive component in each real capacitor, which manifests as leakage, continuously discharging the capacitor. We also have a serial resistive component, ESR, short for equivalent series resistance.

1:48 Whenever we put a load on the capacitor, some of the voltage drops off over this ESR and is thus unusable for the rest of the system. The higher the load, the higher the voltage drop-off. These specific details of the hardware layer affect not only the hardware layer, but also all other layers of the system. Leakage, for example, affects the checkpointing mechanism of the operating system layer, trying to keep system state persistent across power outages. When deciding when to take a checkpoint, the checkpointing mechanism has to keep in mind the leakage of the underlying capacitor.

2:31 ESR, on the other hand, affects the scheduling layer and the application layer. We have here two example tasks, task 1 and task 2, which use different devices, so put a different amount of load on the capacitor. Task 1 has a low load, while task 2 has a high load. Or, in other words, task 1 causes a low voltage drop and task 2 causes a high ESR-related voltage drop. If you now schedule task 2 after task 1, when the system level voltage is already a bit lower, the voltage drop caused by task 2 can cause the system level voltage to fall below the operating threshold and cause an unexpected power failure.

3:16 On the other hand, if you just switch the scheduling order and schedule task 2, when the system level voltage is still a bit higher, the same system is perfectly schedulable. So we see ESR affects scheduling, or in more general terms, we have effects that propagate throughout all layers of the system stack. To make the problems more explicit, we have properties that propagate through all layers of the system stack in different directions. We have design decisions on a hardware level that affect the other software layers, and we have software design decisions that affect the hardware layer or come with specific requirements for the hardware.

3:59 In general, when we design such an intermittent systems, we are faced with multiple objectives that potentially contradict each other. And we are currently lacking the right abstractions to handle these interdependencies and contradictive objectives in an efficient manner. What we want to achieve is to create a hardware software co-design framework that is able to handle all these contradictions and interdependencies and allow carbon-conscious system design so that we can achieve sustainable designs of battery-free systems. In our current work, we performed a case study on designing such an intermittent systems, and we had multiple objectives during that design phase. We wanted to minimize the embodied carbon in our system, and we wanted to maximize the energy that's available for execution at runtime.

4:55 In general, when designing an intermittent system, capacitor selection is an important design phase. One dimension of capacitor choice is the size of the capacitor, so the capacity. Undersizing here threatens the ability to make meaningful progress of the system, and oversizing leads to longer charging times to reach the target voltage, which reduces the execution window. Another dimension for capacitor choice is the material, so the type of capacitor. What we want to achieve here is we want to minimize the ESR and minimize the carbon footprint. And as we'll see shortly, these two actually contradict each other and are in conflict. We're also not looking only at the hardware layer, but we're performing whole system design. So for maximizing the available energy, we also try to derive suitable schedules.

5:49 We can do that, for example, by ordering the task according to the maximum power demand, which translates to an order of ESR-related voltage drop, so having the highest drop first and then the other ones. This diminishes the impact of the ESR-related voltage drop, as we have seen in the example before. We'll now have a look at some of the results of our case study for capacitor selection. So for a given capacity, we can compare the volume of capacitors, so the energy density, and their ESR for different capacitor types from different materials. What we can see is that the different materials form distinct zones in this graph. For example, on the top left, we can see super caps, which have a high energy density, and also a high ESR value. Unfortunately, the US data set did not include ceramic capacitors, but they are known to have a low ESR value, so they could be somewhere around here in this graph. Second, we had to look at the global warming potential, so the embodied carbon footprint of different materials. And what we can see here is that the super caps have a carbon footprint that is by orders of magnitude smaller than the other materials, which mainly stems from the fact that super caps have a very high energy density. For our case study, we ended up using two capacitor types,

7:22 ceramics and super caps. Both have a rather low carbon footprint, and ceramic capacitors have a low ESR, but at the price of low energy density, and super caps have a high energy density, but at the cost of a high ESR.

7:41 We'll now have a look at execution using these capacitor types of different tasks on a real system. We have in total three tasks using different devices, a Bluetooth low energy transceiver, a LoRa transceiver, and a temperature sensor. These tasks are already ordered according to the ESR-related voltage drop with the highest first. What we now see if we try to execute the system using the ceramic capacitors is that we are not even able to finish task 2, as the overall capacity is too low even with multiple ceramic capacitors. With the super cap, on the other hand, we are able to finish the whole task set comfortably. But if you have a look at the beginning, the start of task 1, we'll see a rather high voltage drop, spanning the range of several hundred millivolts.

8:35 This makes up a huge part of the overall usable voltage range, which is rendered unusable, because we have to guarantee that the voltage does not drop below the power failure threshold voltage. Interestingly, if you combine the two capacitor types, we have enough energy to execute the whole task set, and also greatly reduce the effect of the voltage drop. In conclusion, we have seen that we have, during the design phase of such an intermittent system, multiple objectives that potentially contradict each other. And we are currently lacking proper abstractions to handle these contradictions. We have seen in our case study, at the example of the capacitor selection, that we end up with conflicting properties, and that the choice of the energy storage propagates throughout the entire system stack. What we want to achieve in future work, is to create a hardware-software co-design framework for carbon-conscious design decisions, handling these conflicting properties and interdependencies. This way, we can bridge the gap between system-level functionality and carbon awareness, and are able to sustainably design carbon-aware and battery-free systems. CO2CoDe's project repository is open to the public, so feel free to check it out, and thank you for your attention.