4049 views|0 replies

1w

Posts

204

Resources
The OP
 

Technical article: The magic of energy monitoring in DC systems [Copy link]

Introduction

Battery-powered devices have been around for a long time. However, the number of devices powered by rechargeable batteries has grown exponentially in the past two decades, since the advent of the mobile phone. As of 2018, tens of thousands of models of mobile phones, tablets, laptops, and many other small appliances use lithium-ion batteries.

Power consumption is a critical factor for all portable devices. Hardware developers are increasingly focused on achieving low power solutions while increasing functionality, reducing size, and reducing cost. Software developers are also developing new power monitoring methods to reduce power consumption, both in the operating system domain (i.e., through energy monitoring scheduling) and in emerging areas (such as machine learning), building on old algorithms. Power is the energy consumed instantaneously. In electricity, power is equal to the product of instantaneous voltage and current, as shown in Equation 1. The unit of power is Watt (W), which means "joule per second."

Formula 1 - Power Formula

Energy is equal to power times time. Circuits consume energy and batteries store it. Power management typically refers to managing instantaneous current and voltage to meet power delivery capabilities and load conditions. Energy monitoring typically provides information about energy consumption, helping developers with battery management and overall power benchmarking. Active energy management begins when energy is monitored through software designed to take appropriate actions based on specific loads.

Active energy management can be done automatically based on predefined settings or manually at software startup, and its purpose is to provide specific recommendations to the user. For example, when most laptops are running on battery rather than AC power, the processor performance is automatically reduced and the low-power, low-performance integrated graphics processor is used instead of the dedicated processor. Some of the laptop's peripherals can be turned off to extend the battery life, and the user may also receive a notification to reduce the screen brightness or dim the keyboard backlight. Most smartphones offer a variety of energy-saving options, and when the battery level drops to a certain level, active energy management will make recommendations to use energy-saving options, including turning off some existing Internet connections, reducing screen brightness, etc.

But this is not limited to battery-powered devices. Servers carefully monitor power consumption and load levels to determine if certain services can be completely stopped or suspended. In virtual servers, applications can be scaled up and down based on total current usage and usage forecasted based on statistics. For these servers, the hypervisor can be used to completely shut down certain virtual machines. Active energy management can also be used for debugging. Energy monitoring can provide very useful information to determine if the entire system or parts of the system are operating within bounds.

Circuits for measuring DC power and energy

As mentioned previously, electrical power is the product of voltage and current. To accurately measure power, accurate measurements of voltage and current are required. Measuring power over a period of time and summing the results gives energy. Power consumption is not a constant value in most cases, so a selected measurement bandwidth must be used over which voltage and current are measured. A typical example of a DC voltage measurement circuit is the simple voltage divider shown on the left side of Figure 1 and the buffered voltage divider shown on the right side of Figure 1. Both circuits can provide high-precision measurements with proper calibration, and although buffered voltage dividers are more expensive than unbuffered voltage dividers, the former usually consumes less power and is particularly suitable for measuring very low DC signals.

Figure 1 - Voltage divider circuit

Although the Hall effect can also be used to measure current (including DC current), this article focuses on measuring DC current using a shunt resistor because it is more common and less expensive. A shunt resistor is a low-value resistor that is placed in series with a circuit. When current flows through a shunt resistor, a small voltage difference is generated across the shunt resistor. This voltage difference is proportional to the current, as shown in Equation 2, and is usually amplified using an operational amplifier.

Formula 2 - Voltage difference across the shunt resistor

Since the shunt resistor is in series with the rest of the circuit, it can be connected on either side: the upper side (one terminal of the shunt resistor is directly connected to the bus voltage), or the lower side (one terminal of the shunt resistor is grounded), as shown in Figure 2. In both cases, a small voltage difference will appear across the shunt resistor, and the overall voltage of the circuit will be reduced. However, the connection position of the shunt resistor has some effects:

- If the shunt resistor is placed in the lower arm (right side of Figure 2), the voltage across it will be directly connected to ground. Since the shunt resistor is usually very small, the voltage difference across it is also very small, so the current measurement circuit can easily amplify the voltage difference using a cheap low-voltage operational amplifier. This is very helpful for reducing costs. However, there is an obvious disadvantage of the lower arm shunt, that is, the entire circuit is no longer directly connected to ground, but is connected to a position higher than the ground voltage. The voltage difference across the shunt resistor is usually measured in millivolts.

- If the shunt resistor is connected to the upper arm (left side of Figure 2), the circuit is directly connected to ground, eliminating the ground bounce effect. This connection method should be used if the circuit is to be accurately measured or must provide a precise output. The only disadvantage of this method is that it requires a higher voltage differential op amp circuit and may be more expensive depending on the bandwidth of the op amp.

Figure 2 - Current measurement circuit

While voltage, current, and even power itself can be easily measured with analog circuits at a low cost, energy measurement requires the use of more complex circuits. However, the traditional method of measuring energy is to use analog circuits to measure voltage and current, and then use an analog-to-digital converter (ADC) to convert the analog signals into digital signals and output the data to a microcontroller. The role of the microcontroller is to sample the power accumulated over time in the signal to achieve energy measurement. A typical circuit for measuring energy is shown in Figure 3. Adding a microcontroller to the measurement circuit has both advantages and disadvantages. On the one hand, there is great flexibility in algorithm calculations, monitoring different behaviors, and making more detailed reports, such as hourly, daily, etc. In addition, the role of the microcontroller is not limited to energy measurement, but can also trigger events, run custom state machines, or meet any needs of engineers. If the system originally requires a microcontroller, the increase in cost and bill of materials (BOM) is not a problem. On the other hand, the disadvantages of using a microcontroller to monitor energy are that the total power consumption of the measurement system, annoying code development work, and overhead costs will increase, and depending on the accuracy requirements, an external ADC may sometimes be required.

Figure 3 - Typical energy measurement circuit

Over the years, as the industry's demand for DC energy monitoring capabilities has continued to grow, several integrated circuits for this application have been introduced. One example is the PAC1934 integrated circuit from Microchip. This type of integrated circuit can easily sample up to 4 channels simultaneously using only shunt resistors as external components. The basic circuit diagram is shown in Figure 4. The circuit integrates an operational amplifier, ADC, arithmetic logic, memory, and a standard interface (usually I2C or SPI) for connecting to the system. The advantage of using integrated circuits compared to traditional methods is particularly obvious in terms of cost, because everything required for energy measurement is integrated into one integrated circuit, which significantly reduces the BOM and PCB size.

Figure 4 - Microchip PAC1934 block diagram (can measure 4 channels simultaneously)

Advantages of Active Energy Monitoring

With flexible configurations that fit most use cases, ASICs can accumulate power over long periods of time with very low power consumption. Typically, the power sampling rate starts at 8 samples per second and goes up to 1KSPS. For example, the PAC1934 can accumulate power for more than 36 hours at less than 16mA when running at 8SPS, with all 4 channels active and running at 16-bit resolution without software intervention. This approach allows the sampling rate to be changed dynamically, which can expand the range of applications. For example, the integrated circuit is used to monitor the power rails in a standard laptop. When the laptop is running and active, it can be monitored at a sampling rate of 1024SPS, while when the laptop is in a suspended state, the monitoring speed may drop to 8SPS because the power consumption does not fluctuate as much in the suspended state. In addition, reducing the sampling rate can reduce the power consumption of energy monitoring without affecting performance.

One of the most common use cases for active energy monitoring is battery fuel gauges. A dedicated integrated circuit monitors the voltage and current of a battery to keep track of the current battery charge. More advanced battery fuel gauges can also detect when a battery has encountered a specific problem. For example, the fuel gauge can track the relationship between the battery's voltage and charge. If there is no longer a corresponding relationship between the two, it means that the total capacity of the battery has decreased due to aging or other factors. Active energy monitoring is also at the heart of a standard battery management system (BMS). The BMS is the circuit used by multi-cell battery packs that is responsible for safely charging and discharging the battery pack and actively measuring its voltage and current to ensure that the parameters of each battery are the same. The BMS also includes the ability to detect faulty batteries or disconnect the battery pack if the voltage is too high or too low.

Another common application of active energy monitoring is with the operating system on smartphones and tablets, and Linux or Microsoft Windows on laptops, computers, and servers. For smartphones and tablets, the operating system uses various methods to monitor the power consumed by different services and applications. In the early stages, the system does not measure energy directly, but uses tabular data to obtain the power consumption of various operating points, and estimates the energy based on CPU, GPU, and screen usage. The estimated energy consumption data is reported in the form of statistics, which allows users to make decisions on how to further operate the device. Starting with Windows 8, Microsoft introduced the Energy Estimation Engine (E3) in laptops and personal computers. The early stages of E3 work similarly to the estimation algorithms in smartphones, and can estimate the power consumption of each task based on the usage of various resources (processor, graphics, disk, storage, network, display, etc.), thereby enabling power consumption tracking. E3 also introduces the Energy Metering Interface (EMI), which allows system manufacturers to add actual energy measurement sensors to the system and declare them accordingly. If such sensors are included, E3 will use these sensors to accurately measure power and energy instead of just estimating them. Some laptop manufacturers have already implemented these features in their products. In addition, there have been other approaches in the past (such as the energy monitoring implemented by Sony in Vaio notebooks).

), but there is no operating system that supports these methods, and only proprietary applications can access the data. Linux does not yet provide a tool equivalent to Microsoft E3, but they are reportedly working on it. The Industrial I/O subsystem[1] supports the inclusion of various sensors in the operating system, providing a very simple and powerful interface (file-based interface) to user-space applications. However, at the time of this writing, the Industrial I/O subsystem is still an extension of the kernel and not part of the default Linux architecture. Linux also supports energy-aware scheduling[2] and intelligent power allocation, which is an algorithm used in the embedded Linux field that helps the system decide how to schedule different tasks while taking thermal issues into account (energy consumption causes CPU/GPU heating).

Another interesting application of energy measurement ICs is monitoring USB power and energy (for a variety of reasons) [3] and its use in server applications, as described in the first part of this article. Since servers are designed to run all the time, monitoring energy consumption has many benefits, such as improving overall power efficiency through proactive service control, meeting increasingly stringent energy efficiency standards [4], and allowing system administrators to perform predictive maintenance when parts of the server show power consumption anomalies that indicate possible future failures.

Summarize

Depending on the need for energy monitoring and other functions that the system needs to perform, some methods may be more suitable than others. If the embedded system is purpose-built for its own purpose and needs to know its own power consumption or estimate it, the traditional method is more suitable. We also recommend including an internal ADC in the microcontroller to minimize the cost of the energy monitoring function. With this method, only external analog circuits for voltage and current sensing are required. If very high measurement accuracy is required regardless of BOM cost and power consumption, the traditional method is more suitable than integrated circuits.

However, there are many cases where an integrated circuit approach is more appropriate. For example, if you want to integrate energy measurement into the operating system, an integrated circuit approach is appropriate because the integrated solution is built to solve this problem and, with the appropriate drivers, the system automatically recognizes the energy measurement and knows what to do. Energy measurement integrated circuits can usually measure multiple channels (and thus monitor multiple buses), so integrated solutions are a clear advantage when there are a large number of buses to monitor. In addition, multiple integrated circuits can be used on the same communication bus (such as I2C or SPI). Another situation where an integrated solution is more suitable is when measuring energy over a long period of time while the system is in a very low-power sleep mode or completely turned off. The basis for an integrated solution is an integrated energy monitoring chip that consumes very little power and can accumulate energy on its own during a specific period of time without any system intervention.

For highly integrated and densely packed PCBs with high size requirements (e.g., motherboards for mobile phones, tablets, or laptops), integrated circuits take up significantly less space than equivalent discrete components. For example, a chip in the size of a WLCSP (wafer-level chip package) (2.225x2.17mm) contains an energy measurement integrated circuit that can monitor four channels simultaneously.

This post is from Power technology
Add and join groups EEWorld service account EEWorld subscription account Automotive development circle
Personal signature

玩板看这里:

https://bbs.eeworld.com.cn/elecplay.html

EEWorld测评频道众多好板等你来玩,还可以来频道许愿树许愿说说你想要玩的板子,我们都在努力为大家实现!

 
 

Guess Your Favourite
Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list