7
1/7 www.ni.com Bookmark and Share Explore the NI Developer Community Discover and collaborate on the latest example code and tutorials with a worldwide community of engineers and scientists. Check out the NI Community Who is National Instruments? National Instruments provides a graphical system design platform for test, control, and embedded design applications that is transforming the way engineers and scientists design, prototype, and deploy systems. Learn more about NI Creating a Microgrid Energy Management System Using NI LabVIEW and DAQ "When formulating and processing matrix calculations, LabVIEW provides programming tools to code power system applications more easily, which saves programming time." - Gooi Hoay Beng, Read the Full Case Study Author(s): Cheah Peng Huat - Siow Lip Kian - Liang Hong Zhu - Vo Quoc Nguyen - Nguyen Dinh Duc - Gooi Hoay Beng - Students at the Laboratory for Clean Energy Research (LaCER) in the School of Electrical and Electronic Engineering (EEE) at Nanyang Technical University (NTU) created a microgrid prototype. It consists of energy resources such as solar photovoltaics (PVs), wind turbines, fuel cells, and battery banks. The entire microgrid is controlled by the Web-based MEMS server, which controls and monitors different aspects of power management. We developed software programs to manage information collected from the sensors and perform load control and generation The Challenge: Meeting Singapore’s energy needs by exploring sustainable energy resources and enhancing the efficiency of the current supply system. The Solution: Using NI LabVIEW software and NI data acquisition (DAQ) hardware to develop a low-cost microgrid energy management system (MEMS) that includes information and communications technology (ICT), smart meters, and advanced optimization applications to manage distribution systems that serve as a platform for incorporating renewable energy resources.

NI CaseStudy Cs 13453

Embed Size (px)

DESCRIPTION

Case Study

Citation preview

Page 1: NI CaseStudy Cs 13453

1/7 www.ni.com

Bookmark and Share

Explore the NI DeveloperCommunity

Discover and collaborate on the latestexample code and tutorials with aworldwide community of engineers andscientists.

‌Check‌ out‌ the‌ NI‌ Community

Who is National Instruments?National Instruments provides agraphical system design platform fortest, control, and embedded designapplications that is transforming theway engineers and scientists design,prototype, and deploy systems.

‌Learn‌ more‌ about‌ NI

Creating a Microgrid Energy Management System Using NI LabVIEW andDAQ

"When formulating and processing matrix calculations, LabVIEW providesprogramming tools to code power system applications more easily, whichsaves programming time."- Gooi Hoay Beng,

ReadtheFullCaseStudy

Author(s):Cheah Peng Huat - Siow Lip Kian - Liang Hong Zhu - Vo Quoc Nguyen - Nguyen Dinh Duc - Gooi Hoay Beng -

Students at the Laboratory for Clean Energy Research (LaCER) in the School of Electrical and Electronic Engineering (EEE) atNanyang Technical University (NTU) created a microgrid prototype. It consists of energy resources such as solar photovoltaics(PVs), wind turbines, fuel cells, and battery banks. The entire microgrid is controlled by the Web-based MEMS server, whichcontrols and monitors different aspects of power management.

We developed software programs to manage information collected from the sensors and perform load control and generation

The Challenge:Meeting Singapore’s energy needs by exploring sustainable energy resources and enhancing the efficiency of the current supplysystem.

The Solution:Using NI LabVIEW software and NI data acquisition (DAQ) hardware to develop a low-cost microgrid energy management system(MEMS) that includes information and communications technology (ICT), smart meters, and advanced optimization applications tomanage distribution systems that serve as a platform for incorporating renewable energy resources.

Page 2: NI CaseStudy Cs 13453

2/7 www.ni.com

1.

2.

3.

We developed software programs to manage information collected from the sensors and perform load control and generationdispatch. Figure 1 shows the interface diagram between the database and different software modules. We used LabVIEWsoftware to develop modules for advanced sensing and communication, load forecasting, unit commitment, state estimating,and optimal power flow.

Advanced Sensing and Communication SystemIn a microgrid, integrating and interfacing sensing and control devices is challenging because it involves differentcommunication protocols such as RS232 serial communication and RS422/485 modbus communication. To overcome thischallenge, we converted the information into one standard protocol – Ethernet. We easily and economically made theconversion by using a communication protocol converter.

Our main design tasks included sensing and communicating between the MEMS server and power sensors, as well as othercontrolling devices such as circuit breakers, programmable AC sources, and programmable logic controllers (PLC). We installed32 power sensors that support the Modbus protocol throughout the microgrid network for power monitoring measurements suchas voltage, current, active power, reactive power, and circuit breaker status. To deploy a cost-effective solution forcommunicating between the MEMS server and all the power sensors, we divided the sensors into four groups with eight sensorunits per group. Each group eventually connects to an RS485-to-TCP/IP converter where the Modbus protocol is converted toModbus TCP running on the Ethernet LAN network. We issue a unique IP address to each converter and each group of powersensors along with a respective ID.

The system extracts power measurements using the (DSC) Module by enteringLabVIEW Datalogging and Supervisory Controlthe IP address, sensor ID, and register address of the desired power sensor. Users do not need to define the exact Modbusmessages to retrieve the information, which saves valuable time. The system sends all power measurements to the respectiveglobal variables in LabVIEW where they are displayed in the main GUI for monitoring (see Figure 2). Other applications also caneasily use the measurements via global variables. The PLC uses the same technique for controlling circuit breakers in themicrogrid.

The microgrid testbed uses a programmable AC source to test the stand-alone microgrid. To communicate with the powersource, we used the TCP function block in LabVIEW. Users enter the power source’s IP address without including tediousprogramming code to monitor and control the power source.

Load ForecastingThe objective of load forecasting is to predict the total customer load 15 minutes in advance. It has a significant market impacton efficiently operating, controlling, and planning microgrids. Accurate forecast values result in economic savings and enhancesystem operation security.

The prediction method is based on the artificial neural network (ANN), which we developed using LabVIEW (see Figure 3). Toenhance the performance of the load forecasting algorithms, we added the following special features:

Data preprocessing to identify bad and irregular data so we can remove or adjust it before using it for training.

Early stopping to speed up convergence and prevent over-fitting the training data.

Abnormal days scheduling to identify days that have abnormal load profiles and to exclude them in the training so the loadmodel isn’t corrupted. Users can update the abnormal days from the GUI.

Correlation and linear regression analysis to discover the linear relationship between input and target data by using a straightline.

We use the DAQ device to collect historical load data from the Wee Kim Wee School of Communication andNI USB-6215Information building at NTU. We process and store the data in a database we developed using LabVIEW. To collect the dailyload data, we connect the analog inputs of the DAQ device to the distribution grid in the building through a step-down voltagetransformer, which is connected to additional current and voltage sensors to obtain the voltage and current data, respectively.

We successfully integrated the load forecasting algorithm with the software modules in the MEMS unit. The implementedforecasting system is reliable and accurate.

Unit CommitmentThe unit commitment software module is an essential component of MEMS. Based on a forecasted demand profile, the softwaremodule assists the microgrid operators in finding an optimized power generation schedule that minimizes the total operatingcost if the microgrid is isolated or maximizes the total benefit if the microgrid is connected to the main grid. Once theoptimization process is complete, the results, including the on/off status and the amount of kW dispatched from the generatingsources, are sent to the MEMS optimal power flow module for processing. Unit commitment is one of the most complexoptimization problems in power system management. By using the scripts we created using the LabVIEW MathScript RT

, it takes the software only seconds to determine the optimized solution of the formulated problem based on severalModuleconstraints and hundreds of variables (see Figure 5).

The software module includes the following features:

By using the LabVIEW MathScript RT Module, it can solve a complex unit commitment problem within seconds.

With the GUI built in LabVIEW, users can easily run the unit commitment module with default/customized settings.

By using the real-time capturing function of LabVIEW, the software automatically executes at a user-defined start time.

Once the optimization completes, the results are automatically saved in a user-defined path on the server and sent to theMEMS optimal power flow module.

State EstimationState estimation is a MEMS real-time function that uses measurements, circuit breaker status, and voltage regulator tappositions collected by Supervisory Control and Data Acquisition (SCADA) to verify and estimate bus voltages in power systems.The estimated bus voltage magnitudes and voltage phase angles are considered reliable state values of the system and areused as one of the inputs to the optimal power flow module. Its processed bus load values are used as inputs to the loadforecasting module.

The state estimation module has three subfunctions coded in the The MathWorks, Inc. MATLAB programming language basedon the LabVIEW platform:

Topology processor determines network configuration by converting a node-oriented network into a bus-orientednetwork.

State estimation calculates bus voltage magnitudes and angles.

Bad data detection and identification verifies that the raw measurements are good before using them in the stateestimation module.

When coding the state estimation module, it is challenging to ensure that it runs in any power network. Therefore, we usedscript blocks to increase the flexibility when describing complex algorithms. Each subfunction is implemented using script blocksin LabVIEW. The inputs and outputs (1D and 2D) transfer data between script blocks or to the front panel to display the results.A feedback node is also used to detect and identify bad data.

When formulating and processing matrix calculations, LabVIEW provides programming tools to code power system applicationsmore easily, which saves programming time.

We successfully incorporated the state estimation function with other MEMS functions and the microgrid hardware setup at

Page 3: NI CaseStudy Cs 13453

3/7 www.ni.com

1.

2.

3.

1.

2.

We successfully incorporated the state estimation function with other MEMS functions and the microgrid hardware setup atLaCER, NTU (see Figure 6).

Optimal Power FlowOptimal power flow is one of the MEMS online functions. The optimal power flow module finds the optimal settings of a givenpower system network, such as total generation cost or system loss, while satisfying its power flow equations and equipmentoperating limits, such as bus voltage constraints, branch flow limits, and generation source capacity limits. The input data for theoptimal power flow module includes network configuration and load information that are defined by the state estimate module.As part of the output results, the optimal power flow module recommends values for:

Active/reactive power source outputs

Tap ratios of on-load tap-changing transformers

These parameters are sent to the circuit breaker CB controllers, inverter controllers, generator controllers, and load tapcontrollers to keep the system running in a more economical and efficient mode.

We used quadratic programming to solve the optimal power flow problem. We coded this algorithm in MATLAB then integratedit with LabVIEW through the MATLAB script function. We used LabVIEW to link optimal power flow to both state estimation andSCADA to control certain microgrid components. Figure 7 shows how we used LabVIEW toolkits for the main optimal power flowGUI for the microgrid in the LaCER, NTU.

The LF algorithm has been successfully integrated with UC of MEMS. The implemented forecasting system performs reliablywith a satisfactory accuracy.

Unit CommitmentThe Unit Commitment (UC) software module acts as one of the essential components of MEMS. Based on a forecasteddemand profile, the software module is able to assist the microgrid operators to find an optimized power generation schedulethat minimizes the total operating cost while the microgrid is isolated or to maximize the total benefit while the microgrid isconnected to the main grid. Once the optimization process is complete, the results which include the on/off status and thedispatch kW amount of the generating sources will be sent to the Optimal Power Flow (OPF) module of MEMS for processing.UC is one of the most complex optimization problems in power system management. By using the function ofMATLAB ScriptLabVIEW, the software is able to determine within seconds the optimized solution of the formulated problem with severalconstraints and hundreds of variables. The main GUI of UC is shown in Figure 5.

The software module has the following features:

By using function of LabVIEW, a complex UC problem can be solved within seconds.MATLAB Script

With the graphical interface built in LabVIEW, users can easily run the UC optimization with default/customized settings viasimple clicks.

By using the real-time capturing function of LabVIEW, the software can be executed automatically at a user-defined Auto Starttime.

Once the optimization completes, the results are automatically saved in a user-defined path of the server system and at thesame time they are sent to OPF of MEMS.

State EstimationState Estimation is a MEMS real-time function which uses measurements, circuit breaker status and voltage regulator tappositions collected by SCADA to verify and estimate bus voltages in power systems. The estimated bus voltage magnitudes andvoltage phase angles are considered as the trustable state values of the system and will be used as one of the inputs to OPFand its processed bus load values as inputs to Load Forecasting.

State Estimator has 3 sub-functions coded in Matlab programming language based on the LabVIEW platform.

Topology Processor: It determines network configuration by converting a node-oriented network into a bus-orientednetwork.

State Estimation: It calculates bus voltage magnitudes and angles

Bad Data Detection and Identification: It verifies that the raw measurements are good before using them in StateEstimator.

When coding State Estimator, it is a challenge to ensure that it runs in any power networks. Therefore using script blocks is away to increase the flexibility when describing complex algorithms. Each sub-function is implemented by using script blocks inLabVIEW. The inputs and outputs (1D and 2D) are created to transfer data from the script blocks to others or to Front Panel fordisplaying the results. A feedback node is also used as a filter of Bad Data Detection and Identification.

When formulation and processing are based on matrix calculations, LabVIEW provides programming tools to code powersystem applications more easily so it can save time for programmers.

The SE function has been successfully demonstrated in corporation with other MEMS functions and the microgrid hardwaresetup in the Laboratory for Clean Energy Research, NTU. The main GUI for State Estimator is shown in Figure 6.

Optimal Power FlowOptimal Power Flow (OPF) is one of the MEMS online functions. The objective of OPF is to find the optimal settings of a givenpower system network that optimize the system objective function such as total generation cost or system loss while satisfyingits power flow equations and equipment operating limits such as bus voltage constraints, branch flow limits and generationsource capacity limits. The input data for OPF includes network configuration and load information that are defined by SE andas part of the output results, OPF will advise the recommended values for

Active/reactive power outputs of sources

Tap ratios of on-load tap-changing transformers

These parameters will be sent to CB controllers, inverter controllers, generator controllers and load tap controllers to keep thesystem running in more economical and efficient mode.

The quadratic programming is used to solve the OPF problem. This algorithm is coded in and then integrated intoMATLAB LabVIEW through the function. Based on the LabVIEW platform, OPF is linked to both SE and SCADA to takeMATLAB Scriptcontrol over certain microgrid components. By using LabVIEW toolboxes, the main OPF GUI for the Microgrid in the LaCER,NTU is created as shown in Figure 7.

MATLAB® is a registered trademark of MathWorks, Inc.

Author Information:Gooi Hoay Beng School of Electrical and Electronic Engineering (S2-B7c-05) Nanyang Technological UniversitySingapore 639798SingaporeTel: +65-67905481

Page 4: NI CaseStudy Cs 13453

4/7 www.ni.com

Fax: [email protected]

Figure 1: MEMS Data Interface Block Diagram

Figure 2: MEMS Main GUI developed using LabVIEW 2009 for monitoring all the power sensors installed.

Page 5: NI CaseStudy Cs 13453

5/7 www.ni.com

Figure 3: Artificial Neural Network training GUI developed using LabVIEW

Figure 4: Load Forecasting Main GUI developed using LabVIEW

Page 6: NI CaseStudy Cs 13453

6/7 www.ni.com

Figure 5: GUI for Unit Commitment developed using LabVIEW

Figure 6: Main GUI for State Estimation Function developed using LabVIEW

Page 7: NI CaseStudy Cs 13453

7/7 www.ni.com

Figure 7: Main GUI for Optimal Power Flow Function developed using LabVIEW

LegalThis 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 INNI.COM'S TERMS OF USE ( ).http://ni.com/legal/termsofuse/unitedstates/us/