Download

Getting Started

What's New

Documentation

Optional Packages

Mailing List


MATPOWER

A MATLAB Power System Simulation Package

by Ray D. Zimmerman, Carlos E. Murillo-Sánchez & Deqiang (David) Gan


MATPOWER is a package of Matlab M-files for solving power flow and optimal power flow problems. It is intended as a simulation tool for researchers and educators that is easy to use and modify. MATPOWER is designed to give the best performance possible while keeping the code simple to understand and modify. It was initially developed as part of the PowerWeb project.


Download MATPOWER

You will be asked to fill out a brief form the first time you download from this site.



MATPOWER
(current version is 3.2)

See also Optional Packages below.

Terms of Use

  • MATPOWER is free of charge. Anyone may use it.
  • We make no warranties, express or implied. Specifically, we make no guarantees regarding the correctness MATPOWER's code or its fitness for any particular purpose.
  • Any publications derived from the use of MATPOWER must acknowledge MATPOWER <http://www.pserc.cornell.edu/matpower/>.
  • Anyone may modify MATPOWER for their own use as long as the original copyright notices remain in place.
  • MATPOWER may not be redistributed without written permission.
  • Modified versions of MATPOWER, or works derived from MATPOWER, may not be distributed without written permission.

Getting Started

System Requirements

To use MATPOWER you will need:

Both are available from The MathWorks.

Note: Although it is likely that most things work fine in MATLAB 5, this is not supported due to limited testing resources. MATPOWER 3.0 required MATLAB 5 and MATPOWER 2.0 and earlier required only MATLAB 4.

Installation

  1. Unzip the downloaded file.
  2. Place files in a location on your Matlab path.
  3. Start up Matlab.

Running MATPOWER

To run a simple Newton power flow on the 9-bus system specified in the file case9.m, with the default algorithm options, at the Matlab prompt, type:

    runpf('case9')

To run an optimal power flow on the 30-bus system whose data is in case30.m, with the default algorithm options, at the Matlab prompt, type:

    runopf('case30')

To run an optimal power flow on the same system, but with the option for MATPOWER to shut down (decommit) expensive generators, type:

    runuopf('case30')

For help on other options and parameters, type:

    help runpf
    help runopf
    help runuopf
    help mpoption
    help caseformat

To run the test suite, place the files in the 't' subdirectory in your Matlab path, and type:

    test_matpower


What's New in Version 3.2

Below is a summary of the changes since version 3.0.0 of MATPOWER. See the CHANGES file in the docs directory for all the gory details.

New features:

  • AC OPF formulation enhancements
    • new generalized cost model
    • piece-wise linear generator PQ capability curves
    • branch angle difference constraints
    • simplified interface for specifying additional linear constraints
    • option to use current magnitude for line flow limits (Set OPF_FLOW_LIM to 2, fmincopf solver only)
  • AC OPF solvers
    • support for TSPOPF, a new optional package of three OPF solvers, implemented as C MEX files, suitable for large scale systems
    • ability to specify initial value and bounds on user variables z
  • New (v. 2) case file format
    • all data in a single struct
    • generator PQ capability curves
    • generator ramp rates
    • branch angle difference limits
  • New function to build DC PDTF matrix (makePTDF.m)
  • Added 5 larger scale (> 2000 bus) cases for Polish system. (Thanks to Roman Korab).
  • Improved identification of binding constraints in printout.
  • Many new tests in test suite.

Bugs fixed:

  • Phase shifters shifted the wrong direction, again (v.2 had it right).
  • Fixed bug in pfsoln.m which caused incorrect value for Qg when Qmin == Qmax for all generators at a bus in power flow solution.

INCOMPATIBLE CHANGES:

  • User supplied A matrix for general linear constraints in OPF no longer includes columns for helper variables for piecewise linear gen costs, and now requires columns for all x (OPF) variables.
  • Changed the sign convention used for phase shifters to be consistent with PTI, PowerWorld, PSAT, etc. E.g. A phase shift of 10 deg now means the voltage at the "to" end is delayed by 10 degrees.
  • Name of option 24 in mpoption changed from OPF_P_LINE_LIM to OPF_FLOW_LIM.

Documentation

There are two primary sources of documentation for MATPOWER.

The User's Manual is included in the distribution (manual.pdf in docs directory) or it can be downloaded separately from the link above.

Each M-file has its own documentation which can be accessed by typing at the Matlab prompt:

    help <name of M-file>

Documentation for the case data file format can be found by typing:

    help caseformat

If something is still unclear after checking the manual and the help, the source code is the documentation ;-)


Optional Packages

There are three optional packages to enhance the performance of MATPOWER that may be downloaded separately. MINOPF and BPMPDMEX have more restrictive licenses than MATPOWER. Please see the individual Terms of Use for details.

TSPOPF A package of three AC OPF solvers implemented as C MEX files. Suitable for larger scale problems.
MINOPF A MINOS-based AC OPF solver implemented as a Fortran MEX file.
BPMPD_MEX MEX-file version of the high performance BPMPD interior point LP and QP solver. Speeds up DC and LP-based OPF solvers, and improves robustness of MINOPF.

These packages are distributed separately since each has it's own license agreement and terms of use.


Mailing List

An e-mail list MATPOWER-L@cornell.edu has been set up to facilitate discussion of MATPOWER. Only list subscribers are permitted to post to the list.

Feel free to use this list to discuss anything related to MATPOWER, to ask questions about MATPOWER, or to provide feedback to the developers of MATPOWER, such as bug reports, patches or ideas for improvements (though we make no guarantees about if/when they might be included).

Also, if you have any of your own Matlab power systems code that you would like to contribute, feel free to contact us via this list about making it available on the MATPOWER web site.

Joining the list

To join the MATPOWER mailing list, send an e-mail to lyris@cornell.edu with the following line in the body of the message, where "John Doe" is replaced by your real name.

    join MATPOWER-L "John Doe"

Sending mail to the list

To send an e-mail to all of the subscribers of the MATPOWER mailing list, simply address your e-mail to MATPOWER-L@cornell.edu. Only subscribers are permitted to send e-mail to the list.

Leaving the list

You can unsubscribe from the list at any time by sending an e-mail to lyris@cornell.edu with the following line in the body of the message.

    leave MATPOWER-L


PSERC Logo MATPOWER
Copyright © 1997-2007 PSERC
Tue, Sep 21, 2007