InterPSS Community

Latest News

InterPSS Cloud Edition released

IEEE ODM Release V0.4 is now available to download

InterPSS Dev Release 1.5.00 is currently available to download
Home‎ > ‎

InterPSS Overview



InterPSS
is a development project aimed to develop an Internet technology based software system for design, analysis, and simulation of power systems. The project is based on the latest Internet technology, including Java, Xml, the Eclipse platform and other open-source software systems. Its open and loosely coupled system architecture will allow components developed by others to be easily plugged into InterPSS system to augment its functionality, and equally important, allow its components to be integrated into other systems to provide certain power system simulation functionality or services. InterPSS currently has already implemented AC load flow, DC load flow, short circuit, and transient stability, and will include relay coordination, harmonics, dynamic (small singnal) stability, reliability, and many other power system design, analysis, and simulation modules. InterPSS grid computing solution provides a foundation for creating computational grids to perform computationally-intensive power system simulation using conventional, inexpensive computers in a local area network (LAN) with minimum administration overhead. The project is currently developed and maintained by a team of developers living in the United States, Canada and China.

Introduction

Power system simulation software systems have been widely used for analysis, design, and operation of modern power systems. The large-scale blackouts in the United States, United Kingdom and Italy in 2004 accelerated the adoption of advanced computer and network technologies in power systems. Commercial power system simulation software systems currently available in the market were largely developed using procedure programming languages, such as Fortran and C. . Software systems developed using such approaches are known to be hard to maintain, extend and integrate into other systems. We believe these obsolete technologies and systems will eventually be replaced with new systems based on modern, network friendly and object-oriented programming languages, such as Java or .Net/C#, using a component-based development approach. InterPSS is such an attempt to create a totally new software system using the Java programming language. InterPSS could be running on multiple platforms, including Windows, Linux and Unix, as long as there is a Java Runtime Environment (JRE) available on the platform. 


InterPSS System Architecture

InterPSS system architecture is shown in the following Figure.


Fig 1 InterPSS System Architecture


At the center of the architecture is the power system simulation framework, which is based on an object-oriented power system simulation model proposed in Ref(1) . UML is used to model power systems for simulation purpose and Eclipse EMF to generate source code for the simulation framework. The goal of InterPSS design is to be flexible and extensible software system. Since it is an open-source system, worked largely by volunteers, easy to maintain is also an important part of the design gaol. InterPSS simulation algorithms, user GUI, I/O modules, and integration interface implementations are plugins, which can be easily customized and replaced. InterPSS components are configured and/or integrated based on the Spring Framework. InterPSS development team uses Eclipse IDE and NetBeans IDE to do the development.

InterPSS Power System Simulation Framework

InterPSS foundation is a power system simulation framework, which consists of a power system simulation object model and a set of interfaces with which the outside world can interact with InterPSS core simulation engine. The framework is designed in a loosely coupled way that the core simulation engine could be easily extended or integrated into other systems as a standalone component.

Traditionally, a power system simulation program has a fixed format for creating data files as the input. InterPSS core simulation engine publishes its Java API. InterPSS does not a fixed format for the input. Instead, InterPSS provides a set of plugins, we call them input File Adapters, for inputting data in particular format into InterPSS. It is also quite easy to develop your own custom file adapter to load your data in your own format into InterPSS.

InterPSS Object Model

InterPSS simulation framework consists of a set of simulation objects, and interfaces with which the outside world could interact with these objects. The following is a discussion of key InterPSS simulation objects and the SimuContext interface.

  • Network Topology

Modern power system simulation algorithms are mostly built on the power network nodal admittance Y-matrix. From the simulation perspective, power system network topology could be described as a Network object containing a set of connected Bus objects and Branch objects. InterPSS use the following network topology object model to describe power system networks for the simulation purpose.


Fig 2 Network Topology UML Class Diagram


A Bus object is a "node" to which a set of Branch objects could be connected. A Branch object is an "edge" with two terminals (from side and to side) which can be connected between two Bus objects (fromBus and toBus). A Network object is a container where Bus objects can be defined, and Branch objects can be connected between these Bus objects to form a network topology for simulation purpose. For more details, please see Ref(1).

  • Network Classes

InterPSS breaks the power simulation problem into many relative simple concept layers, such as Network, AclfNetwork ..., as shown in the following diagram. InterPSS uses object-oriented programming techniques, inheritance and composition, to reuse functionality defined in other concept layers. Currently the following concept layers are de=ifined. More concept layers for such concepts as hamonics, OPF-optimal power flow, will added into InterPSS object model in the future.

  • Network (JavaAPI): Network topology information.
  • AclfNetwork JavaAPI): Positive sequence network Y-matrix information and standard loadflow calculation information.
  • AclfAdjNetwork (JavaAPI): Loadflow adjustment and control information.
  • AcscNetwork (JavaAPI): Negative and zero sequence network Y-matrix information for short circuit calculation.
  • SimpleFaultNetwork (JavaAPI): Allows you to define simple bus or branch, symmetric or non-symmetric faults.
  • DistNetwork (JavaAPI): Allows you to define distribution systems, where device nameplate values are used.
  • DStabilityNetwork (JavaAPI): For large disturbance transient stability simulation.

Fig 3 Network UML Class Diagram

  • Bus Classes

InterPSS uses Bus object concept to describe logical power system buses for the simulation purpose. The Bus inheritance and composition relationship is shown in the following figure:

  • Bus (JavaAPI): Base Bus class, contenting topology connection information.
  • AclfBus (JavaAPI): Positive sequence bus information for loadflow calculation.
  • AcscBus (JavaAPI): Negative and zero sequence bus information for short circuit calculation.
  • DistBus (JavaAPI): Distribution system bus device information, where device nameplate values are used.
  • DStabBus (JavaAPI) : Machine, exciter, governor, stabilizer information for transient stability simulation.

Fig 4 Bus UML Class Diagram


  • Branch Classes

InterPSS uses Branch object concept to describe logical power system branches for the simulation purpose. A Branch object can connect to a From-Bus object and a To-Bus object. The Branch inheritance and composition relationship is shown in the following figure:

  • Branch (JavaAPI): Base Branch class, contenting topology connection information.
  • AclfBranch (JavaAPI): Positive sequence branch information for loadflow calculation.
  • AcscBranch (JavaAPI): Negative and zero sequence branch information for short circuit calculation.
  • DistBranch (JavaAPI): Distribution system branch device information, where device nameplate values are used.
  • DStabBranch (JavaAPI): Information for transient stability simulation.

Fig 5 Branch UML Class Diagram


  • Switch/Breaker Model

In power system control centers, power network structure change information are gathered in terms of actual switch/break control actions. InterPSS currently supports two way to model the switch/breaker control actions.

Dummy Bus on Branch


Fig 6 Dummy Bus on Branch


Multiple dummy buses could be defined to model branch sections. For example, section I->k might be used to model a switch, so that one can issue the following statement to open the branch:

 OPEN LINE FROM BUS I TO BUS k CIRCUIT 1

Bus Section


Fig 7 Bus Section


Multiple bus sections could be defined to separate a bus into multiple sections. In this way open switch at section-2 and section-3 will break the bus into 3 independent buses.

InterPSS simulation framework consists of many simulation classes. At runtime, instance of these classes are created, contained by other objects and cross referenced. Keeping track of all instances and their relationship at runtime becomes rather complex. If one only wants to use the framework as a black-box component. InterPSS provides a SimuContext class to simplify the simulation object management. SimuContext is a Facade Pattern, which is used to wrap all simulation objects into a relative simple enclosing interface. The following diagram provides a concept view of the SimuContext interface.


Fig 8 SimuContext Concept


Object Adapter

InterPSS uses the Object Adapter Pattern extensively. The Adapter Design Pattern 'adapts' one interface for a class into one that that might be easy to use in other situations. An adapter allows classes to work together that normally could not because of incompatible interfaces by wrapping its own interface around that of an already existing class.

For example, the AclfBus class has all raw information in PU for load flow analysis. Object adapters, as shown in the following diagram, are defined so that one can deal load flow concepts, such as Swing bus, PV Generator bus, at higher abstract level. The following are some sample code to outline the benefit of using Object Adatper.


   AclfBus bus = …  // create a AclfBus object

double voltMag = 1.0; // Assume it is a Swing Bus
double voltAng = 0.0;

// First the hard way, you need to remember voltMsg->gen.re and voltAng->gen.im
bus.setGen(new complex(voltMag, voltAng));

// the recommended way
SwingBusAdapter swingBus = (SwingBusAdapter)bus.adapt(SwingBusAdapter.class);
swingBus.setVoltMag(voltMag, UnitType.PU);
swingBus.setVoltAng(voltAng, UnitType.Rad);

double pGen = 0.5; // Assume it is a PV Bus
double voltMag = 1.0;

PVBusAdapter pvBus = (PVBusAdapter)bus.adapt(PVBusAdapter.class);
pvBus.setPGen(pGen, UnitType.PU);
pvBus.setVoltMsg(voltMsg, UnitType.Rad);



Fig 9 Object Adapter UML Class Diagram


Object Factory

Based on the Factory Method Pattern, InterPSS has a set of object factories for creating the simulation objects. The following are some sample code to create Loadflow analysis objects.


   // create a AclfBus object
AclfBus myBus = CoreObjectFactory.createAclfBus("BusId");

// create an AclfBranch object
AclfBranch myBranch = CoreObjectFactory.createAclfBranch();

// Create an AclfNetwork object
AclfNetwork myAclfNet = CoreObjectFactory.createAclfNetwork();

// Create the default loadflow algorithm
LoadflowAlgorithm algo = CoreObjectFactory.createLoadflowAlgorithm(myAclfNet);


Analysis and Simulation Algorithm

InterPSS separates or decouples analysis and simulation algorithms, which could be applied to relevant Network classes to perform, for example, Loadflow analysis, from the Network class, as shown in the following diagram. The Network class holds data objects and certain reference relationship among these objects, which is the InterPSS architecture foundation and not allowed to be customized in the current InterPSS architecture design. However the analysis and simulation algorithms are designed to be replaceable. This is possible because of the decoupling of the Network class and the algorithm class.


Fig 10 Algorithm UML Class Diagram


InterPSS Programming Style

InterPSS uses Java as its programming language. The development is based on pure object-oriented programming approach. The following are some sample code to show how to build a simplest Loadflow "program".

Create AclfNetwork

The following are sample code to create an AclfNetwork object to represent a simple 2-Bus, as shown in the figure.



Fig 11 Sample 2-Bus Loadflow Network

   public static void set2BusNetworkData(AclfNetwork net, IPSSMsgHub msg) {
double baseKva = 100000.0;

// set system basekva for loadflow calculation
net.setBaseKva(baseKva);

// create a AclfBus object
AclfBus bus1 = CoreObjectFactory.createAclfBus("Bus1");
// set bus name and description attributes
bus1.setAttributes("Bus 1", "");
// set bus base voltage
bus1.setBaseVoltage(4000.0);
// set bus to be a swing bus
bus1.setGenCode(AclfGenCode.SWING_LITERAL);
// adapt the bus object to a swing bus object
SwingBusAdapter swingBus = (SwingBusAdapter)bus1.adapt(SwingBusAdapter.class);
// set swing bus attributes
swingBus.setVoltMag(1.0, UnitType.PU);
swingBus.setVoltAng(0.0, UnitType.Deg);
// add the bus into the network
net.addBus(bus1);

AclfBus bus2 = CoreObjectFactory.createAclfBus("Bus2");
bus2.setAttributes("Bus 2", "");
bus2.setBaseVoltage(4000.0);
// set the bus to a non-generator bus
bus2.setGenCode(AclfGenCode.NON_GEN_LITERAL);
// set the bus to a constant power load bus
bus2.setLoadCode(AclfLoadCode.CONST_P_LITERAL);
// adapt the bus object to a Load bus object
LoadBusAdapter loadBus = (LoadBusAdapter)bus2.adapt(LoadBusAdapter.class);
// set load to the bus
loadBus.setLoad(new complex(1.0, 0.8), UnitType.PU, baseKva);
net.addBus(bus2);

// create an AclfBranch object
AclfBranch branch = CoreObjectFactory.createAclfBranch();
// set branch name, description and circuit number
branch.setAttributes("Branch 1", "", 1);
// set branch to a Line branch
branch.setBranchCode(AclfBranchCode.LINE_LITERAL);
// adapte the branch object to a line branch object
LineAdapter lineBranch = (LineAdapter)branch.adapt(LineAdapter.class);
// set branch parameters
lineBranch.setZ(new complex(0.05, 0.1), UnitType.PU, 4000.0, baseKva, msg);
// add the branch from Bus1 to Bus2
net.addBranch(branch, "Bus1", "Bus2");
}

Run Loadflow Analysis

InterPSS provides a default load flow algorithm implementation. The following are sample code to run load flow.


   public static void simpleLoadflow(IPSSMsgHub msg) {
// Create an AclfNetwork object
AclfNetwork net = CoreObjectFactory.createAclfNetwork();

// set the network data
set2BusNetworkData(net, msg);

// create the default loadflow algorithm
LoadflowAlgorithm algo = CoreObjectFactory.createLoadflowAlgorithm(net);

// use the loadflow algorithm to perform loadflow calculation
algo.loadflow(msg);

// output loadflow calculation results
System.out.println(AclfOut.loadFlowSummary(net));
}

Testing

InterPSS is an open-source development project, developed by volunteers around the world. InterPSS uses an agile development approach with heavy emphasis on testing. InterPSS testing is divided into two major phases: Unit testing and User Acceptance testing. A FitNesse based WiKi style InterPSS User Acceptance Testing site has been designed for InterPSS user acceptance testing purpose. User can run the InterPSS Acceptance Test Suite to perform the official InterPSS acceptance testing at any time. Also, user can go to the User Test Area to create his/her own test cases. User can upload his/her components (Java jar files) and/or test data files to test them against the existing InterPSS components. The test cases could be run repeatedly to verify new versions of InterPSS release.

This following is a simple case for Loadflow user acceptance testing.


Build Testing Case

!|Action Fixture|
|start|com.interpss.test.user.core.AclfBuildFixture|
|press|createAclfNetwork|
|enter|setBaseKva|100000|
|enter|addSwingBus|Bus1,4000,1.0,0.0,0.0,0.0|
|enter|addLoadBus|Bus2,4000,1.0,0.8|
|enter|addLineBranch|Bus1,Bus2,0.05,0.1,0.0|

Run Loadflow Operation

!|Action Fixture|
|press|runAcLoadFlow|
|check|lfConverged|true|

Check Results

Check bus load flow results for Bus Id (Bus1).
!|com.interpss.test.user.core.AclfFixture|
|busId|busVoltage?|busAngle?|busPIntoNet?|busQIntoNet?|
|Bus1|1.0|0.0|1.11529|1.03059|

Check branch load flow results for branch Bus1->Bus2.
!|com.interpss.test.user.core.AclfFixture|
|branchFromBusId|branchToBusId|branchFrom2ToP?|branchFrom2ToQ?|branchTo2FromP?|branchTo2FromQ?|
|Bus1|Bus2|1.11529|1.03059|-0.99999|-0.79999|

Bus and Branch loadflow acceptance testing are show as follows. Green color indicates that the testing results are the same as expected.


Table-1 Bus Loadflow Results Checking
Image:BusTestingResults.jpg


Table-2 Branch Loadflow Results Checking
Image:BranchTestingResults.jpg


If for some reason, for sample, some loadflow calculation code was touched, the results are different than the expected, red color flags will be shown, as follows:


Table-3 Branch Loadflow Results Checking With Error
Image:BranchTestingResultsError.jpg


If this happens, a full investigation is needed.

References

[1] "Object-oriented Programming, C++ and Power System Simulation", IEEE Trans. on Power Systems, Vol.11, No.1, Feb. 1996 pp206-216.