Tinderbox Power: Difference between revisions
m (→Measurement) |
|||
(15 intermediate revisions by the same user not shown) | |||
Line 3: | Line 3: | ||
= Instrumentation = |
= Instrumentation = |
||
The laptops used for [[Tinderbox_Testing|Tinderbox]] have been instrumented with a number of small value resistors inserted into crucial locations in the power distribution network. By measuring the time average of the voltage across these resistor |
The laptops used for [[Tinderbox_Testing|Tinderbox]] have been instrumented with a number of small value resistors inserted into crucial locations in the power distribution network. These are wired to a high precision, network connected, isolated multiplexed input voltmeter (an [http://www.home.agilent.com/agilent/techSupport.jspx?pid=429828&pageMode=MN&guid=162632&cc=US&lc=eng Agilent 34980A]). By measuring the time average of the voltage across these resistor, we obtain a snapshot of the power consumption of the laptop at a particular time. |
||
Each laptop has a different set of locations wired for measurement |
Each laptop has a different set of locations wired for measurement. A configuration file is used to represent this information in a manner which the measurement scripts can utilize. For example: |
||
* [[XO_4_Tinderbox_Power|XO-4 Tinderbox]] |
|||
* [[XO1.75_Tinderbox_Power|XO-1.75 Tinderbox]] |
|||
* [[Media:Tinderbox_B3.pdf|XO-1 B3 build]] ([http://dev.laptop.org/git/projects/tinderbox/tree/power/tinderboxB3.csv configuration]) |
|||
* [[Media:Tinderbox_C2.pdf|XO-1 C2 build]] ([http://dev.laptop.org/git/projects/tinderbox/tree/power/tinderboxC2.csv configuration]) |
|||
= Measurement = |
|||
== Configuration File Format == |
|||
The network-connected voltmeter is repeatedly read by a python script running on a networked computer, which uses a descriptive configuration file, gathers the desired information, and then formats it for output. Currently, scripts supporting tree-based output and table based outputs are provided. |
|||
A laptop is described to the measurement script using a comma separated values (CSV) file describing the instrumentation. This file has a format of: |
|||
channel,name,resistance,rail_voltage,rail |
|||
== Tree-Based Output== |
|||
where |
|||
* channel is the voltmeter channel (absolute, e.g. 2010, 3020, etc.) |
|||
* name is the name associated with this channel |
|||
* resistance is the resistance of the current sense resistor |
|||
* rail_voltage is the voltage at the high side of the current sense res. |
|||
* rail indicates that a voltage varies, and is measured by another channel. If rail is: |
|||
** 0 - indicates rail_voltage is static and should be used |
|||
** positive number - indicates which rail should be used |
|||
** negative number - indicates that this is a rail voltage |
|||
A Python script ([http://dev.laptop.org/git/projects/tinderbox/tree/power/tree-tinderbox.py tree-tinderbox.py]) is provided which makes a set of measurements over the network and outputs an HTML document showing a graphical representation of the power distribution network in the laptop. |
|||
See the example configuration files for the existing [http://dev.laptop.org/git/projects/tinderbox/power/tinderboxB3.csv|B3] and [http://dev.laptop.org/git/projects/tinderbox/power/tinderboxC2.csv|C2] setups. |
|||
== Table-Based Output == |
|||
= Measurement = |
|||
A [ |
A Python script ([http://dev.laptop.org/git/projects/tinderbox/tree/power/read-tinderbox.py read-tinderbox.py]) is provided which connects to the voltmeter over the network and makes one or more sets of measurements. The measurements may be output in XHTML, CSV, Python print, or pretty print formats. |
||
== Script Options == |
|||
This script takes the following options: |
This script takes the following options: |
||
Line 38: | Line 31: | ||
*-H, --html Print out measurements with XHTML markup |
*-H, --html Print out measurements with XHTML markup |
||
*-R, --raw Print out measurements in raw Python format |
*-R, --raw Print out measurements in raw Python format |
||
*-C, --csv Print out measurements in comma separated format |
*-C, --csv Print out measurements in comma separated format with header |
||
*-P, --pwr Print out measurements in comma separated format for rsmith |
|||
*-n NPLC, --nplc=NPLC Time to wait (in 16mS units) between measuring channels |
*-n NPLC, --nplc=NPLC Time to wait (in 16mS units) between measuring channels |
||
*-h, --help Show this help message and exit |
*-h, --help Show this help message and exit |
||
Line 51: | Line 45: | ||
The XHTML markup is suitable either for direct viewing with a browser or further manipulation using XSL. |
The XHTML markup is suitable either for direct viewing with a browser or further manipulation using XSL. |
||
= Configuration File Format = |
|||
A tinderbox'ed laptop is described to the measurement script using a comma separated values (CSV) file describing the instrumentation. There have been two formats used. A simple one was used for XO-1 measurements. With XO-1.5 development, a more descriptive output script (tree-tinderbox) was written and a newer configuration file format was developed to support it. The newer configuration file format is backwards compatible, so that it may also be used with older software (read-tinderbox). |
|||
== Newer file format == |
|||
This file format was introduced to support the generation of power distribution trees. It may also be used with older software. |
|||
There are five basic measurements, each described by a single line in the configuration file: |
|||
* '''power measurement''' - Measures the power passing a particular point in the power distribution system |
|||
* '''voltage measurement''' - Measures a voltage (useful in calculating power of a variable voltage power supply.) |
|||
* '''remaining power in a rail''' - This calculates what all the other power sinks on a rail must be consuming. |
|||
* '''inefficiency of a rail (fixed)''' - This calculates the power wasted by a linear voltage regulator |
|||
* '''inefficiency of a rail (calculated)''' - This calculates the power wasted by a switching power regulator, given that both the input and output power is known. |
|||
Each line in the configuration file has a format of: |
|||
channel, name, resistance, rail_voltage, rail, parent_chan, type |
|||
===channel=== |
|||
For real measurements (power and voltage), this is the channel number on the voltmeter. |
|||
For virtual measurements (remaining power or inefficiencies), this is a unique negative number. |
|||
===name=== |
|||
This is the comma delimited ASCII string used to represent a measurement in reports |
|||
===group=== |
|||
This is the logical grouping in which this measurement should be included. |
|||
Typical names are: none (voltage measurement or waste), cpu, net, |
|||
display, and rail (supplies multiple groups). |
|||
===resistance=== |
|||
For power measurements, this is the sense resistance across which the voltage is being measured. |
|||
For voltage measurements, remaining power, or inefficiency measurements, this should be 1. |
|||
===rail_voltage=== |
|||
This indicates the voltage which should be used for calculating power measurements. |
|||
This may be a static value (such as 3.3 or 1.8), or it may be 0, indicating that it is a dynamic (measured) value (indicated by the rail field). |
|||
For voltage measurements, remaining power, and dynamic inefficiencies, this field is zero. |
|||
For static inefficiencies, this is a floating point number representing the ratio of power wasted to power measured by another channel (indicated by rail). |
|||
===rail=== |
|||
If this is a power measurement using a dynamic rail voltage, this field indicates the channel number of a voltage. |
|||
If this is a power measurement using a static voltage, a remaining power or dynamic inefficiency measurement, this field is zero. |
|||
If this is a static inefficiency measurement, the rail field indicates the channel number of the power measurement the static inefficiency is tracking. |
|||
A negative one (-1) indicates that this is a voltage measurement. |
|||
===parent_chan=== |
|||
This indicates which channel measures the power from which this channel's power is derived. |
|||
If 0, indicates that this is the root channel of system, typically the power input. |
|||
For voltage measurements, this field is optional. |
|||
===type=== |
|||
This field is used to differentiate between power, remaining power, dynamic and static inefficiency measurements. |
|||
* 0 - Power measurement |
|||
* 1 - Remaining power measurement |
|||
* 2 - Static inefficiency measurement |
|||
* 3 - Dynamic inefficiency measurement |
|||
For voltage measurements, this field is optional. |
|||
== Older file format == |
|||
This file format may only be used with read_tinderbox.py. It has a format of: |
|||
channel, name, group, resistance, rail_voltage, rail |
|||
where |
|||
* channel is the voltmeter channel (absolute, e.g. 2010, 3020, etc.) |
|||
* name is the name associated with this channel |
|||
* group is a group of measurements |
|||
* resistance is the resistance of the current sense resistor, in ohms |
|||
* rail_voltage is the voltage at the high side of the current sense res., in volts |
|||
* rail indicates that a voltage varies, and is measured by another channel. If rail is: |
|||
** 0 - indicates rail_voltage is static and should be used |
|||
** positive number - indicates which rail should be used |
|||
** negative number - indicates that this is a rail voltage |
|||
See the example configuration files for the existing [http://dev.laptop.org/git?p=projects/tinderbox;a=blob;f=power/tinderboxB3.csv;hb=HEAD B3] and [http://dev.laptop.org/git?p=projects/tinderbox;a=blob;f=power/tinderboxC2.csv;hb=HEAD C2] setups. |
|||
[[Category:Hardware]] |
|||
[[Category:XO-1.75]] |
|||
[[Category:XO-1.5]] |
|||
[[Category:XO-1]] |
Latest revision as of 12:36, 3 October 2012
This page describes the instrumentation of the Tinderbox laptops to measure power, and the scripts used to measure and interpret this information.
Instrumentation
The laptops used for Tinderbox have been instrumented with a number of small value resistors inserted into crucial locations in the power distribution network. These are wired to a high precision, network connected, isolated multiplexed input voltmeter (an Agilent 34980A). By measuring the time average of the voltage across these resistor, we obtain a snapshot of the power consumption of the laptop at a particular time.
Each laptop has a different set of locations wired for measurement. A configuration file is used to represent this information in a manner which the measurement scripts can utilize. For example:
Measurement
The network-connected voltmeter is repeatedly read by a python script running on a networked computer, which uses a descriptive configuration file, gathers the desired information, and then formats it for output. Currently, scripts supporting tree-based output and table based outputs are provided.
Tree-Based Output
A Python script (tree-tinderbox.py) is provided which makes a set of measurements over the network and outputs an HTML document showing a graphical representation of the power distribution network in the laptop.
Table-Based Output
A Python script (read-tinderbox.py) is provided which connects to the voltmeter over the network and makes one or more sets of measurements. The measurements may be output in XHTML, CSV, Python print, or pretty print formats.
This script takes the following options:
- -f CHANNEL_FILENAME, --file=CHANNEL_FILENAME Filename of tinderbox channel descriptors
- -a MEASURE_HOST, --addr=MEASURE_HOST DNS name or IP addr of voltmeter
- -l NUM_LOOPS, --loop=NUM_LOOPS Number of times to loop, taking measurements
- -c CHANNEL, --channel=CHANNEL Channel to read. For mutiple channels, use x-y,z
- -H, --html Print out measurements with XHTML markup
- -R, --raw Print out measurements in raw Python format
- -C, --csv Print out measurements in comma separated format with header
- -P, --pwr Print out measurements in comma separated format for rsmith
- -n NPLC, --nplc=NPLC Time to wait (in 16mS units) between measuring channels
- -h, --help Show this help message and exit
Typical usage is:
read_tinderbox.py --html -f tinderboxC2.csv
A subset of the channels specified in the configuration file may be measured using the -c option:
read_tinderbox.py -f tinderboxB3.csv -c 2018 read_tinderbox.py -f tinderboxC2.csv -c 3004-3007 read_tinderbox.py -f tinderboxB3.csv -c 2000,2004-2010,2025
The XHTML markup is suitable either for direct viewing with a browser or further manipulation using XSL.
Configuration File Format
A tinderbox'ed laptop is described to the measurement script using a comma separated values (CSV) file describing the instrumentation. There have been two formats used. A simple one was used for XO-1 measurements. With XO-1.5 development, a more descriptive output script (tree-tinderbox) was written and a newer configuration file format was developed to support it. The newer configuration file format is backwards compatible, so that it may also be used with older software (read-tinderbox).
Newer file format
This file format was introduced to support the generation of power distribution trees. It may also be used with older software.
There are five basic measurements, each described by a single line in the configuration file:
- power measurement - Measures the power passing a particular point in the power distribution system
- voltage measurement - Measures a voltage (useful in calculating power of a variable voltage power supply.)
- remaining power in a rail - This calculates what all the other power sinks on a rail must be consuming.
- inefficiency of a rail (fixed) - This calculates the power wasted by a linear voltage regulator
- inefficiency of a rail (calculated) - This calculates the power wasted by a switching power regulator, given that both the input and output power is known.
Each line in the configuration file has a format of:
channel, name, resistance, rail_voltage, rail, parent_chan, type
channel
For real measurements (power and voltage), this is the channel number on the voltmeter.
For virtual measurements (remaining power or inefficiencies), this is a unique negative number.
name
This is the comma delimited ASCII string used to represent a measurement in reports
group
This is the logical grouping in which this measurement should be included. Typical names are: none (voltage measurement or waste), cpu, net, display, and rail (supplies multiple groups).
resistance
For power measurements, this is the sense resistance across which the voltage is being measured. For voltage measurements, remaining power, or inefficiency measurements, this should be 1.
rail_voltage
This indicates the voltage which should be used for calculating power measurements. This may be a static value (such as 3.3 or 1.8), or it may be 0, indicating that it is a dynamic (measured) value (indicated by the rail field).
For voltage measurements, remaining power, and dynamic inefficiencies, this field is zero.
For static inefficiencies, this is a floating point number representing the ratio of power wasted to power measured by another channel (indicated by rail).
rail
If this is a power measurement using a dynamic rail voltage, this field indicates the channel number of a voltage. If this is a power measurement using a static voltage, a remaining power or dynamic inefficiency measurement, this field is zero.
If this is a static inefficiency measurement, the rail field indicates the channel number of the power measurement the static inefficiency is tracking.
A negative one (-1) indicates that this is a voltage measurement.
parent_chan
This indicates which channel measures the power from which this channel's power is derived.
If 0, indicates that this is the root channel of system, typically the power input.
For voltage measurements, this field is optional.
type
This field is used to differentiate between power, remaining power, dynamic and static inefficiency measurements.
- 0 - Power measurement
- 1 - Remaining power measurement
- 2 - Static inefficiency measurement
- 3 - Dynamic inefficiency measurement
For voltage measurements, this field is optional.
Older file format
This file format may only be used with read_tinderbox.py. It has a format of:
channel, name, group, resistance, rail_voltage, rail
where
- channel is the voltmeter channel (absolute, e.g. 2010, 3020, etc.)
- name is the name associated with this channel
- group is a group of measurements
- resistance is the resistance of the current sense resistor, in ohms
- rail_voltage is the voltage at the high side of the current sense res., in volts
- rail indicates that a voltage varies, and is measured by another channel. If rail is:
- 0 - indicates rail_voltage is static and should be used
- positive number - indicates which rail should be used
- negative number - indicates that this is a rail voltage
See the example configuration files for the existing B3 and C2 setups.