How to measure power consumption of a device

R&S®ESSENTIALS | Power supplies fundamentals

How to measure power consumption of a device

Paul Denisowski, Product Management Engineer

Accurate energy consumption measurements are crucial for assessing device performance and ensuring efficient operation. Modern benchtop DC power supplies, such as the Rohde & Schwarz R&S®NGM series, provide advanced functions for power measurements and analyzing power consumption.

Measure power usage with readback

Readback is a feature that enables a power supply to measure and display its actual output voltage and current. Readback values are updated continuously during operation, and they are often displayed on the screen when the instrument is in use. Unlike the configured values, which are user defined, readback values represent real-time data that reflect the power supply’s output.

Readback resolution defines the granularity with which the actual voltage and current can be measured, and readback accuracy refers to how accurately a power supply can measure the actual output voltage or current. Both specifications differ between power supply models.

How readback is displayed on R&S®NGM
How readback is displayed on R&S®NGM

Along with providing the operator with accurate, real time information, readback allows for:

  • Remote sensing: Compensating for voltage drops between the power supply and the load
  • Protection: Ensuring that voltage, current and power stay within defined limits
  • Mode determination: Identifying whether the power supply operates in constant voltage or constant current mode
  • Logging: Recording the measured output values over time for detailed analysis

In particular, logging is necessary to record readback values for future analysis.

Logging and power recording for energy consumption measurement

Logging involves recording power over time. This function is essential for detailed energy consumption measurement. It requires voltage and current to be measured simultaneously, so one possible approach is using two external meters: one for voltage and one for current. However, it is often easier and more accurate to use a power supply’s integrated logging function, which is non invasive (in that it doesn’t require the circuit to be broken) and ensures that the voltage and current values are time synchronized.

Recording power consumption with external meters
Recording power consumption with external meters

Common parameters for logging include:

  • Voltage, current and power
  • Logging interval (in units of seconds)
  • Logging start/stop conditions or duration

The standard logging rate in most benchtop power supplies is generally limited to about 10 samples per second. Although this is sufficient for many power measurements, it may not be fast enough to capture transients or other very short duration events. As such, some power supplies have a high speed or fast logging option. This mode allows the user to specify voltage and current sample rate, which can be up to 500,000 samples per second, enabling transitions in the microsecond range to be captured.

Logged data is typically stored in plain text files in CSV (comma separated values) format. This format is convenient for processing and analyzing data. Each CSV file includes a header with information such as timestamp, voltage, current and power. Subsequent lines provide the recorded values at each measurement interval.

Example of a CSV log file
Example of a CSV log file

For fast logging, data is stored in a binary format, which can later be converted to CSV. Fast log files do not contain timestamps, but timestamps can still be derived from the start time and logging interval.

Example of data in binary format
Example of data in binary format

Logged data can be stored on the power supply itself or saved to removeable media like USB drives. In some cases, the data can also be streamed to an external device or computer over a LAN interface using SCPI commands.

Analyzing logged data often involves plotting and performing statistical or trend analysis to gain insights into power consumption patterns and system performance. This can be done with a variety of software tools, such as Microsoft Excel or MATLAB.

How to measure power consumption of a device with the R&S®NGM

Now, it’s time go over the steps of power supply measurement. The precise details would depend on the model of your power supply, but the basic steps should remain more or less the same. Today, we’ll look at how to make and record power measurements using the Rohde & Schwarz R&S®NGM power supply.

Let’s start with standard logging:

  • Step 1: Decide on the save location (e.g., USB stick)
  • Step 2: Set the logging interval
  • Step 3: Set the logging mode
  • Step 4: Enable manual triggering (optional)
  • Step 5: Configure the format of CSV files that will contain data

We’ll go through each of these steps on the R&S®NGM.

To access the logging menu, press the Menu button and go to the “Device” tab. Logging parameters can be found by scrolling to the “Logging” menu item and pressing the arrow. The logging function must be turned off (or disabled) before the logging configuration can be changed.

How to access logging configuration
How to access logging configuration

The next step is to define where the log file will be saved. If “Save Location” is set to “Auto,” the power supply will use an attached USB drive as the save location if available. If there no USB drive, it will use its own internal storage folder. “Manual” can be used to manually set both the target location as well as the path or directory where the log files will be stored.

How to set log file save location
How to set log file save location

The parameter “Interval” defines how often data is written to the log; this is also the time between measurements. Clicking on “Interval” will bring up a dialog box where the logging interval can be entered.

How to set the logging interval
How to set the logging interval

The R&S®NGM supports four different logging modes:

  • Unlimited: Logging is started manually and continues until it is manually stopped. This is the default mode.
  • Count: Logging is started manually but stops automatically once a user defined number of samples have been acquired.
  • Duration: Logging is started manually but stops automatically once a user defined time interval has elapsed.
  • Span: Logging starts at a user defined date and time and stops after a user defined duration.
How to set the logging mode
How to set the logging mode

Logging can be manually started or stopped from the “Logging” menu. Another way to start or stop logging is by using a trigger, which can be enabled using the toggle next to “Triggered.”

Two ways to start and stop logging
Two ways to start and stop logging

You can easily check whether logging is ongoing or inactive by looking at the “LOG” icon on the status bar.

Logging active indicator
Logging active indicator

Now let’s talk about how to modify the format of the CSV log files. This can be done by clicking on the “CSV Setting” menu item. From here, you can configure the following parameters:

  • Field delimiter: comma or semicolon
  • Decimal separator: dot or comma
  • Error designator: Not a Number (NaN) or empty
  • Line end marker: carriage return (CR) / line feed (LF) or just LF

If this sounds confusing, don’t worry about it. The default CSV settings are the most common ones, so in most cases, these parameters will not need to be set or modified.

CSV settings
CSV settings

Summary

  • Readback provides real time monitoring of output values.
  • Logging allows for detailed recording and analysis of readback values.
  • There are two types of logging: standard and fast. Standard logging rates are usually limited to 10 samples/second. Fast logging rates can be up to 500,000 samples/second.
  • Values from standard logging are stored in CSV format, and values from fast logging are stored in binary format.
  • There are many ways to process and analyze log files.

Need more guidance on power measurements? Our experts are here to help.

Curious to learn more about test fundamentals?

Sign up for our newsletter

Also interesting for you