For most embedded systems, the energy available - not the speed of the processor - is the resource that decides whether the project works or not. This lecture gathers the minimum mathematical tools for thinking rigorously about consumption: power, energy and electric charge, the energy profile of a real system, the metrics suited to each type of device, estimating autonomy on a battery, the components of CMOS consumption and the hardware and software techniques that reduce them.
1The subject and structure of the lecture6 min
Lectures 2 and 3 explained what a processor looks like and how its performance is measured. Today we change the axis of analysis: instead of "how fast", we ask "at what energy cost" - the central question for any battery-powered system, from an agricultural sensor to a pacemaker.
- Low energy consumption is one of the four fundamental characteristics of embedded systems (Lecture 01)
- A higher frequency does not automatically mean "better" - the performance equation shows the trade-off (Lecture 02)
- The operating modes and the interrupt mechanism of the ARM architecture are exactly the tools on which the low-power techniques discussed today are built (Lecture 03)
Learning outcomes
- To distinguish correctly between power, energy and electric charge, with their units
- To read the energy profile of a periodic system and compute the average power
- To choose the right metric (per operation, per bit, per packet) for a given system
- To estimate the autonomy of a battery-powered device, starting from a consumption profile
- To explain the components of CMOS power and the effect of voltage/frequency scaling (DVFS)
- To recognize the hardware and software techniques for reducing consumption and their limits
2Energy constraints and design objectives8 min
Numerous embedded systems - IoT nodes in places that are hard to reach, portable or implantable medical devices, industrial sensors - must work for years with no human intervention. For these, the energy available directly limits operation, so consumption must be treated as a design requirement from the first stages, not as a last-minute optimization.
Four factors tie the design decision, in practice, to concrete constraints:
- Autonomy - the indicator perceived directly by the user. A sensor that needs a new battery every month may cost more in maintenance than it is worth; an autonomy of 5-10 years makes the same solution economically viable.
- Thermal limits - the power drawn turns into heat, and a high temperature reduces the lifetime of the components and may force the processor to reduce its frequency. Compact embedded systems, with no fan, have to control the temperature through low consumption and passive dissipation.
- Reliability and maintenance - lower consumption means less thermal stress and fewer charging cycles, hence rarer maintenance - essential when thousands of nodes of a network would require individual attention.
- Impact at large scale - a negligible saving on a single device becomes important multiplied by millions of units: operating costs, cooling requirements, batteries produced and replaced. Energy efficiency is at once a technical, an economic and an ecological objective.
3Power, energy and electric charge10 min
Energy analysis demands that we clearly distinguish three quantities often used, incorrectly, as synonyms.
| Quantity | Symbol | Unit | Meaning |
|---|---|---|---|
| Voltage | V | volt (V) | the potential difference applied to the circuit |
| Current | I | ampere (A) | the rate of transfer of electric charge |
| Electric charge | Q | coulomb (C); Ah | the total quantity of charge transferred |
| Power | P | watt (W) | the rate at which energy is consumed/transferred |
| Energy | E | joule (J); Wh | the total quantity consumed or stored |
P = V · I (instantaneous power)E = P · T (energy, at constant power; in general, the integral of power over time)Q = I · T (charge, at constant current)E ≈ V · Q (nominal energy, from voltage and charge)Two 2000 mAh batteries (the same charge, Q = 2 Ah): a NiMH battery at 1.2 V stores E ≈ 1.2 × 2 = 2.4 Wh; a Li-Ion battery at 3.7 V stores E ≈ 3.7 × 2 = 7.4 Wh - more than three times as much energy, although the capacity in Ah is identical. Capacity in Ah describes charge, not energy - the voltage matters too.
A useful convention to remember: 1 Wh = 3600 J and 1 mAh = 3.6 C. A 10 Wh battery can ideally give 1 W for 10 hours, or 10 W for one hour - the total energy stays the same, only the rate of consumption differs.
A microcontroller at 3.3 V drawing 12 mA in active mode has a power of
P = 3.3 × 0.012 = 39.6 mW - an instantaneous value, which says nothing about autonomy
until we know how long it stays in that regime. A radio module consuming 100 mW for 10 seconds
has used E = 0.1 × 10 = 1 J ≈ 0.278 mWh - energy always depends on duration, not merely
on peak power.
4The energy profile of an embedded system10 min
The consumption of an embedded system is not, in general, constant - the processor, the sensors and the communication interfaces are activated only when needed. An energy profile describes this variation of power/current over time and allows the states that dominate the total consumption to be identified.
D = t_active / T. For a system with two states:
P_average = D · P_active + (1 - D) · P_sleepA device operates periodically, with a period of 1 second: 8 mA for 20 ms, then 10 µA for the remaining 980 ms. What is the average current, and why is it so small compared with 8 mA?
See the solution
I_average = (8 mA × 0.020 s + 0.010 mA × 0.980 s) / 1 s = 0.1698 mA ≈ 169.8 µA
At 3.3 V, the average power is P_average = 3.3 × 0.1698 mA ≈ 0.560 mW. Although the
active current is 8 mA, the average is far lower thanks to a duty cycle of only 2% - a system can
have large current peaks and still have good autonomy, if it spends the rest of the time in deep
rest.
5Energy metrics and estimating autonomy12 min
There is no single metric suited to every embedded system - the choice depends on the function of the device.
| Metric | Relation | Use |
|---|---|---|
| Average power | P_average = E / T | estimating autonomy |
| Peak power | P_max = max P(t) | sizing the supply/converter |
| Energy per cycle | E_cycle = Σ Pᵢtᵢ | periodic systems, IoT nodes |
| Energy per operation | E_op = E_total / N_op | comparing processors/algorithms |
| Energy per bit | E_bit = E_total / N_bit | comparing communication technologies |
A frequently used combined metric is the energy-delay product: EDP = E ×
T_execution - a low value indicates a favourable compromise, but EDP is not universal: a device
running for years on a battery may prioritize pure energy, while a real-time control system may strictly
prioritize meeting the deadline, whatever the EDP.
Estimating autonomy
T_ideal = E_nominal / P_average (assumes 100% of the energy is usable,
with no losses)T_estimated = E_nominal × k_usage × η_supply × ... / P_average (more realistic, with
efficiency and usage factors)The device of the previous section (8 mA/20 ms active, 10 µA/980 ms sleep, 3.3 V), with a Li-Ion 3.7 V / 2000 mAh battery, a converter efficiency of 90%, usable energy 80%. What is the estimated autonomy?
See the solution
E_nominal = 3.7 V × 2 Ah = 7.4 Wh
E_usable = 7.4 × 0.8 × 0.9 = 5.328 Wh
T_estimated = 5.328 Wh / 0.560 mW ≈ 9514 h ≈ 396 days
The result does not include the self-discharge of the battery, the consumption of the protection circuits or the reduction of capacity at low temperatures - the real autonomy measured will almost always be lower than the one computed. Check with the widget above how the autonomy changes if you raise the sleep current from 10 to 50 µA - a difference that looks small, but matters enormously in the long run.
6The main consumers and CMOS power12 min
Before discussing techniques for reducing consumption, we have to know where the consumption of a processor comes from. Most modern microcontrollers are made in CMOS technology, and their total consumption divides into four components:
P_total = P_dynamic + P_short-circuit + P_static + P_analogue| Component | Source | Dominates in... |
|---|---|---|
| Dynamic | charging/discharging the internal capacitances on switching | the active regime |
| Short-circuit | brief simultaneous conduction, during the logic transition | usually minor |
| Static | leakage currents, even with no switching | prolonged rest |
| Analogue | oscillators, PLL, ADC, references, regulators | depends on which domain is active |
An "inactive" microcontroller may still consume if the main oscillator, the PLL loop, the ADC reference, the brown-out detector, the watchdog, the SRAM or the debug interfaces remain active. A genuinely minimal consumption requires analysing every functional domain, not just the CPU core - a frequent source of unpleasant surprises when the real consumption is measured.
The main consumers of energy in a typical embedded system, in approximate order: the processor (above all in sustained active regimes), the memory (repeated Flash/RAM accesses), the analogue peripherals (ADC, comparators), and - often the largest consumer of all - the wireless communication interface, the subject of a dedicated section below.
7Dynamic power, static power and DVFS10 min
P_dynamic ≈ α · C_eff · V² · f, where α = the activity factor,
C_eff = the equivalent switched capacitance, V = the voltage, f = the frequency.The relation shows something essential: dynamic power varies linearly with frequency, but quadratically with voltage. Reducing the voltage brings far greater savings than reducing the frequency, at the same activity.
A processor carries out the same work in two configurations: (1) V=1.2 V, f=100 MHz; (2) V=0.9 V, f=70 MHz. How do the power, the execution time and the total energy change?
See the solution
P₂/P₁ = (0.9/1.2)² × (70/100) = 0.5625 × 0.7 ≈ 0.394 - the power falls by ~60.6%.
T₂/T₁ = 100/70 ≈ 1.43 - the execution time grows by 43%, because we are working more
slowly.
E₂/E₁ = 0.394 × 1.43 ≈ 0.563 - the total energy falls by ~43.8%.
The central observation: at a fixed number of cycles and constant voltage, reducing the frequency alone leaves the dynamic energy almost unchanged (the time grows by exactly as much as the power falls). The real savings come from lowering the voltage - which is why DVFS always scales the voltage and the frequency together, not one separately from the other.
P_static = V · I_leakage - leakage currents present even with no
switching, dependent on the technology, the temperature and the internal state of the circuit.A higher temperature increases the leakage, which increases the power (hence the temperature) - a positive feedback which, in modern manufacturing technologies, can make static power an important part of the total consumption, above all in modes with reduced switching activity.
8Hardware techniques for reducing consumption10 min
Hardware techniques aim to reduce the voltage, the switching activity, the active capacitance or the leakage currents - applicable at the level of the processor, of the peripherals or of the whole system.
| Technique | The component reduced | Advantage | Limitation |
|---|---|---|---|
| DVFS | dynamic power | large savings from lowering the voltage | lower performance, transition cost |
| Clock gating | switching activity | fast wake-up, preserves the state | does not eliminate static power |
| Power gating | dynamic and static power | very low consumption of the block switched off | loss of state, reactivation latency |
| Independent domains | selective consumption of the subsystems | switching off only the unused blocks | additional hardware complexity |
| Hardware accelerators | energy per unit of work | fast, specialized execution | reduced flexibility, additional area |
| DMA and local memories | the transfers and the CPU activity | fewer wake-ups and external accesses | configuration cost |
Software complements the hardware techniques through: energy profiling of the code (in order to identify the sections that dominate consumption), algorithms that minimize accesses to external memory (slower and more energy-costly than registers or on-chip memory), grouping operations so as to allow longer periods of rest between them, and explicit use of the power-management APIs offered by the manufacturer of the microcontroller or by the RTOS in order to choose correctly the low-power mode suited to each pause in the execution.
9The low-power modes10 min
Modern processors offer several energy states. The names differ between manufacturers, but the principle is common: the lower the consumption, the less of the context is kept alive, and the greater the latency of coming back.
| State | Active elements | Preservation of the context | Wake-up latency |
|---|---|---|---|
| Active | CPU, memories, selected peripherals | complete | no wake-up needed |
| Idle | memory + most peripherals | complete | very low |
| Sleep | selected domains and wake-up sources | usually complete | low/medium |
| Deep Sleep | minimal domain + retention memory | partial/complete | medium/high |
| Standby/Shutdown | minimal wake-up logic | limited | high; possibly a reset |
The possible wake-up sources differ on every platform: a real-time timer, an external pin, a watchdog, a low-power comparator, a communication interface, a sensor event. If the wake-up requires a peripheral to be kept active, the consumption of the resting state grows - the designer has to identify the minimum mechanism needed for each application.
10The energy cost of wireless communication10 min
Wireless communication allows data to be transmitted without a physical connection, but introduces an energy cost that can dominate the whole budget of an IoT node. A radio transceiver does not consume energy only when transmitting: switching on the oscillators, synthesizing the carrier frequency, amplifying the signal and processing the protocol cost energy even during reception - reception may have a consumption comparable with transmission.
E_radio = E_start-up + E_listening + E_transmission + E_reception +
E_protocol + E_retransmissionsA typical transceiver has several states: shutdown (minimum consumption, complete reinitialization on waking), sleep (some settings preserved, faster return), standby (oscillators already active, fast transition to RX/TX), reception and transmission. Contrary to intuition, continuously listening to the channel may be more costly than periodically transmitting short packets.
Why the size and the number of packets matter
The energy of a packet: E_packet = E_fixed + P_TX × T_packet, where E_fixed includes
switching on and stabilizing the transceiver. For short messages, this fixed energy may dominate
the total cost entirely - which is why grouping several measurements into a single packet
(instead of one packet per measurement) reduces consumption significantly, even if each grouped packet
is a little longer.
If the probability of a packet being delivered successfully is p, the average number of attempts is
1/p, and the average energy needed for delivery is E_delivery = E_attempt / p.
For p = 0.5 (half the packets are lost), two attempts are needed on average - the energy doubles
compared with a lossless link. A poor radio link does not merely delay the system, it also makes it
consume visibly more energy.
There is no wireless technology that offers at the same time maximum range, maximum throughput, minimum latency and minimum consumption - the choice (BLE, Wi-Fi, LoRaWAN, Zigbee and so on) is always a compromise along those four axes, according to the requirements of the application.
11Local processing versus transmitting the data4 min
A design decision with a direct energy impact: do we process the data locally (on the device) or send it raw to a server? The practical rule: if the energy needed to transmit the raw data exceeds the energy needed to process it locally in order to extract only the relevant information, local processing (Edge Computing, discussed conceptually in Lecture 01) wins outright.
A vibration sensor can send 1000 raw samples per second (costly on the radio), or it can run locally a simple algorithm that detects only the anomalies and sends a single "alert/no alert" bit every few minutes. The second variant demands more computing energy, but far less transmission energy - and the radio is almost always the dominant consumer.
12Frequent mistakes5 min
- "The capacity of the battery in mAh tells me everything I need to know about the energy available." False - mAh is a quantity of charge, not of energy. The same capacity at different voltages means completely different energies (see the NiMH vs. Li-Ion example). Always convert to watt-hours (Wh) before comparing two batteries.
- "If I reduce the frequency of the processor, I automatically reduce the energy consumed." False, or at least incomplete - at constant voltage, reducing the frequency reduces the power, but increases the execution time proportionally, and the dynamic energy stays almost unchanged. The real savings come from reducing the voltage, not merely the frequency. Check whether the technique applied (full DVFS, or only frequency scaling) really reduces the energy, not merely the instantaneous power.
- "An ultra-low-power mode (Deep Sleep) is always the best choice." Not if the pauses are very short - the energy cost of the transition may exceed the saving, and the long wake-up latency may cause important events to be missed. Choose the low-power mode on the basis of the typical duration of the pause, not merely of the nominal consumption of the state.
13Summary and glossary5 min
Energy, power and electric charge are distinct quantities, with different units - confusing them leads directly to wrong estimates of autonomy. The energy profile of a periodic system, combined with the duty cycle, allows the real average power to be computed, often very different from the peak power. CMOS consumption divides into dynamic power (∝V²f) and static power, and DVFS exploits exactly the quadratic dependence on voltage. The hardware techniques (clock/power gating, independent domains) and the software ones (profiling, grouping operations, correctly chosen power modes) work together, not in isolation. And for connected systems, wireless communication is often the dominant consumer - which is why local processing and packet grouping matter so much.
14Self-check questions6 min
- What is the difference between power, energy and electric charge? What units do they have?
- What is the duty cycle and how does it influence the average power?
- Why does reducing only the frequency of the processor not automatically reduce the dynamic energy?
- What are the components of the total CMOS power?
- List three hardware techniques for reducing consumption and the limitation of each.
- Why can continuously listening to a radio channel cost more than transmitting?
- A device has P_average = 2 mW and a 3 Wh battery. What is the ideal autonomy?
15Where to go next2 min
The next lecture continues directly along this thread: now that we understand where the consumption comes from and how it is computed, we move on to concrete software techniques of energy optimization - algorithms, data structures and programming patterns that reduce consumption measurably, not merely theoretically.
All the concepts of this lecture (energy profile, duty cycle, DVFS, battery autonomy) are applied directly in Laboratory 01 and Laboratory 02, where you measure them on real hardware - a Raspberry Pi 5 and an ESP32-C6 node.