Dynamic Control of Battery Energy Storage Systems for Peak Demand Shaving Using NI CompactDAQ and LabVIEW "We developed a user interface in LabVIEW, which easily integrated with NI devices for measurement and control to solve many integration challenges. We used a full package solution from NI for the whole process of system development from design and simulation to implementation." - Kein Huat Chua, Universiti Tunku Abdul Rahman The Challenge: Reducing the peak demand surcharge to utility customers and the cost of power generation. The Solution: Using NI CompactDAQ and NI LabVIEW to develop dynamic control of a battery energy storage system (BESS) that shaves peak demand to reduce electricity bills and the cost of power generation. Author(s): Kein Huat Chua - Universiti Tunku Abdul Rahman Yun Seng Lim - Universiti Tunku Abdul Rahman Stella Morris - Universiti Tunku Abdul Rahman Smaller capacity power plants, such as gas power plants, are often used as standby plants during the peak demand hours to meet the customer needs. Such standby power plants operate only during the daily peak demand period, typically from 11:00 a.m. to 4:00 p.m. These standby power plants operate below rated capacity, so their efficiency is low. This increases the cost of power generation, and the utility company passes the cost to customers. The utility rate structure for high-power-consumption customers typically includes the charge for energy used (kWh) and maximum demand (kW). BESSs offer a high potential for peak shaving. For this project, we developed a dynamic control algorithm for the BESS to shave the peak demand. Optimal Cost Analysis of BESS The factors we use to determine the profitability of shaving the load with BESSs include the cost of the inverter, the efficiency of the power inverter, the cost of the battery, and the service life of the battery. The amount of power we can shave depends on the rating of the inverter and its efficiency. However, peak shaving may fail if the energy stored in the batteries is insufficient for the desired period of time during peak demand. Hence, we need to consider the size of the inverter along with the capacity of the batteries when calculating the optimal system cost. The depth of discharge (DOD) significantly impacts battery service life. To accurately estimate the payback period of the investment, we take the DOD into account. Figure 1 shows the payback period of the BESS for different DODs with respect to the peak deduction. The minimum payback period is 5.13 years for a DOD of 80 percent. Figure 2 shows the financial gain from BESSs via peak shaving. System Description We used a bi-directional power inverter, Sunny Island 5048, and a battery bank to create a BESS. (see Figure 3). A NI cDAQ-9174 USB chassis, a NI 9225 three-channel ± 300 V module, and a NI 9227 four-channel current measurement module monitored the power flow. LabVIEW controlled the bi-directional inverter via computer, the communication was built via USB-to-RS485 data converter. We connected a 240 V, 50 Hz single- phase local grid, a resistor load bank, and a bi-directional power inverter. The resistor load bank emulated the customer load profile. The inverter, rated at 5 kW, connected to four sealed lead acid batteries with a total capacity of 480 Ah, which is equivalent to 5.76 kWh. Figure 4 shows the connection of the BESS to the grid and power flow direction. Control Strategy We developed a user interface in LabVIEW, which easily integrated with NI devices for measurement and code composer. We used a full package solution from NI for the whole process of system development from design and simulation to implementation. (see Figure 5). The threshold setting of maximum allowable power is crucial in determining the success of peak shaving. Inappropriate threshold setting can result in failure to shave the targeted peak demand. If the threshold is set too low, it may result in insufficient energy from the BESS to maintain the targeted maximum demand, so the grid power exceeds the threshold when the BESS stops delivering power to the grid. If the threshold is set too high, it may result in the BESS ineffectively shaving peak demand. We can determine an appropriate threshold setting from the desired peak demand to shave and the energy required from the historical load profile data. There are two strategies for peak shaving using a BESS. In the first, users forecast and predict the peak demand with a high confidence level. Figure 6 shows the control algorithm of peak shaving for the first strategy. The BESS delivers power (PBESS) to the grid based on the difference between the load power and the threshold power. In the cases of insufficient historical power consumption data and difficult-to-predict peak demand, we use the second strategy to shave the peak demand. In this case, the predicted energy demand may not be accurate, which could result in insufficient energy storage in the BESS. Hence, in the second strategy, we use the state of charge (SOC) of the battery bank as an indicator to determine the amount of power delivered to the grid (see Figure 7). The percentage (a %) of PBESS is determined based on the lower range (Rl) and upper range (Ru) of the SOC. The algorithm in the dotted area consists of multiple ranges and their corresponding percentages of power injection. Table 1 shows the range of SOC and the corresponding power injection for peak demand shaving. In the second strategy, the BESS dynamically adjusts its power injection, which prevents the failure of peak shaving due to insufficient energy storage. Results and Discussion We used the first strategy for the first study. We increased the load from zero to nearly 4,860 W in steps of 486 W and observed that the grid power concurrently rises with the rise of load. Figure 8 shows the peak shaving for the emulated load at different threshold settings. From Figure 8a, we see that, when the load exceeded the threshold of 4 kW at 1,855 s, the BESS took about 20 s to respond to the changes and begin to deliver power to the grid. The amount of power delivered to the grid was equal to the difference between the load and threshold. The grid power rose above the threshold for 20 s and then dropped below the threshold setting. When the load continues to increase at 1,986 s, the BESS increases the power injection to limit the grid power at its threshold level of 4 kW. We also see that when the load decreases at 2,137 s, the BESS reduces its power injection. The grid power dropped to 3488 W for 20 s and then rose to 3,940 W. We can apply these explanations of system response to different threshold settings as shown in figures 8b and 8c. In our second test scenario, the load demand remained high at 4.23 kW. In this case, the BESS adopted the second strategy for shaving the peak demand (see Figure 9). Initially the grid power was close to 4.23 kW and the SOC wass 95 percent. The BESS began to inject 100 percent of the power at 400 s and the grid power dropped to 250 W. The SOC continued to decay, and when the SOC dropped below 90 percent, the BESS reduced its power injection to 3500 W. Similarly, when the SOC dropped to below 80 percent and 70 percent, the BESS reduced its injection to 2900 W and 1900 W, respectively. 1/10 www.ni.com to 3500 W. Similarly, when the SOC dropped to below 80 percent and 70 percent, the BESS reduced its injection to 2900 W and 1900 W, respectively. When the SOC dropped below 60 percent, the BESS stopped injecting power to the grid and the grid power rose to 4,200 W. These results indicate that the BESS can shave the peak demand as long as the SOC of the batteries is above 60 percent. When the SOC drops below 60 percent, the BESS fails to shave the peak demand and, as a result, the electricity bill on that particular month is not reduced. Conclusion We successfully developed, two dynamic control strategies for a BESS using LabVIEW and NI CompactDAQ. We use NI virtual instruments to monitor the power flow and consumption of the system. If we can accurately predict the daily load profile with confidence, the BESS delivers power to the grid according to the required power without considering its SOC. On the other hand, if the confidence level of load prediction is low, we apply the second strategy to shave the peak demand. The power delivered to the grid depends on the battery SOC level. We tested both strategies with a real experimental setup. Author Information: Kein Huat Chua Universiti Tunku Abdul Rahman Jalan Genting Kelang, Kuala Lumpur 53300 Malaysia Tel: 60126060433 chuakh@utar.edu.my (mailto:chuakh@utar.edu.my) Figure 1. Payback Period of a BESS for Different DODs 2/10 www.ni.com Figure 2. Financial Gain From a BESS Figure 3. BESS Setup 3/10 www.ni.com Figure 4. BESS Connection to Grid and Power Flow Direction 4/10 www.ni.com Figure 5. BESS User Interface Developed in LabVIEW 5/10 www.ni.com Figure 6. Control Algorithm of Peak Shaving (First Strategy) 6/10 www.ni.com Figure 7. Control Algorithm of Peak Shaving (Second Strategy) 7/10 www.ni.com Table 1. Range of SOC and Corresponding Power Injection for Peak Demand Shaving Figure 8a. Peak Shaving for Emulated Load at a Threshold Setting of 4 kW 8/10 www.ni.com Figure 8b. Peak Shaving for Emulated Load at a Threshold Setting of 3 kW Figure 8c. Peak Shaving for Emulated Load at a Threshold Setting of 2 kW 9/10 www.ni.com Figure 9. Peak Shaving Using Our Second Strategy Legal This case study (this "case study") was developed by a National Instruments ("NI") customer. THIS CASE STUDY IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND AND SUBJECT TO CERTAIN RESTRICTIONS AS MORE SPECIFICALLY SET FORTH IN NI.COM'S TERMS OF USE ( http://ni.com/legal/termsofuse/unitedstates/us/ (http://ni.com/legal/termsofuse/unitedstates/us/)). 10/10 www.ni.com