Starting from:

$30

PROJECT 2: ENERGY ANALYSIS & OPTIMIZATION

ECE 461/561
EMBEDDED SYSTEM OPTIMIZATION
PROJECT 2: ENERGY ANALYSIS & OPTIMIZATION
OVERVIEW
In this project you will build an energy model of the Lab 4 voltmeter and then use it to guide your energy optimizations.
DETAILS
You’ll use the Analog Discovery 2 (AD2) power supply to power the FRDM-KL25Z board through the P3V3 rail. Make sure that there
is no jumper on J20, and that its shorting trace has been cut. Then connect the FRDM-KL25Z to the AD2 as shown in the diagram
below. You’ll need loose header pins or short pieces of solid wire to connect the female AD2 leads to the female KL25Z headers.
You will measure the current flowing into the P3V3 rail from the power supply through 10 Ω resistor using the differential inputs to
Channel 1 of the Analog Discovery 2 (AD2). The current is 1/10 of the measured voltage. Configure the power supply in Waveforms
by selecting Welcome+ and Supplies. Set a voltage of 3.3V for the Positive Supply and turn on the Master Enable. This circuit should
protect both systems if they are powered simultaneously, as the resistor limits the current which can flow.
The current used will change as the MCU cycles through different states as shown in
the table and example diagrams below.
MCU Running MCU Sleeping
LED On IMCU_Run+ILED IMCU_Sleep+ILED
LED Off IMCU_Run IMCU_Sleep
10Ω
1+
1- V+ Gnd 2+
Use your Analog Discovery 2 to measure each state’s current, duration and frequency. Then model the power used by the two
largest loads: the MCU and the blue LED (the only LED used in this project, as it is active at VDD = 3.3V). Build an energy model of the
system in a spreadsheet based on your measurements and calculations. For example:
Measured Calculated
State Current Voltage Time (duration
per event)
Frequency (events
per second)
Power Duty
Cycle
Average Power Fraction of Total
Average Power
LED On,
MCU Running
LED Off,
MCU Running
LED On,
MCU Sleeping
LED Off,
MCU Sleeping
Run: MCU On, waking up
or going to sleep
LED On
MCU Sleeping
Run: MCU On, waking up
or going to sleep
MCU Sleeping MCU Sleeping
From these measurements, calculate each mode’s duty cycle (fraction of time spent). Then calculate the average power used by
each mode (duty cycle * voltage * current * time). Or you may wish to refine the model to break out MCU power (running vs.
sleeping) and LED power (on vs. off). You’ll need to make additional power models as you change the optimize system.
OPTIMIZATION PROCESS SUGGESTIONS
Use the fraction of total power to guide your optimizations. The following optimizations may be helpful, depending on the relative
power use in the system:
 Reduce the amount of time the LED is on (but it must still be visible). Changing the LPTMR frequency (currently 10 Hz) will
let you change the minimum LED on time. Note that your code still needs to sample the voltage and display the correct
color every 500 ms.
 Put the processor into a lower power stop mode.
 Use a clock mode which lets the processor wake up quickly.
 Reduce or eliminate floating point math. Note the correct LED color must be lit based on the supply voltage (this easily
tested with the AD2 power supply).
PERFORMANCE GOALS
For full performance credit, your system must meet the following goals:
 ECE 461: average power 1000 µW
 ECE 561: average power 500 µW
DELIVERABLES
 Archive of entire project directory, including source code and subdirectories.
 Project Report (PDF)
o Introduction
o Power and Energy Model (in spreadsheet)
o Energy Optimization
 Brief narrative description of each optimization you tried, in order performed
 Analysis and discussion of results
o Lessons learned in this project, and how you might do things differently next time
 Technical issues (processor, peripherals, compiler, assembly code, etc.)
 Changes to your own development process
o Conclusions
SCORING
 Optimization: 40%
 Report: 60%
Extra credit will be granted for exemplary work in any categories.

More products