You are here: Home / Teaching / MatDyn

MatDyn

© Stijn Cole
ESAT-ELECTA
Katholieke Universiteit Leuven
Belgium

Introduction

MatDyn is a free Matlab based open source program to perform dynamic analysis of electric power systems. It is inspired by Matpower, a power flow and optimal power flow program in Matlab and shares its philosophy: "It is intended as a simulation tool for researchers and educators that is easy to use and modify." The source code of MatDyn is available. Care has been taken to keep it well structured and easy to understand.

License

  • MatDyn is free and open source software.
  • MatDyn may be modified for personal use provided this license remains in force.
  • MatDyn comes with no warranty whatsoever; not even the implied warranty of merchantability or fitness for a particular purpose.
  • Any publications derived from the use of MatDyn must acknowledge MatDyn.
  • MatDyn may not be redistributed without prior written permission.
  • Modified versions of MatDyn, or works derived from MatDyn, may not be distributed without prior written permission.

Download

Download latest version here.

Installation

The prerequisites for MatDyn are the following:

  • Matlab must be installed
  • Matpower must be installed and added to the Matlab path. It is available here
  • MatDyn must be installed and ideally added to the Matlab path

You are now ready to run a first simulation.

Running a simulation

Dynamic simulations are run by calling the rundyn function:

>> [Angles,Speeds,Eq_tr,Ed_tr,Efd,PM,Voltages,Stepsize,... Errest,Failed,Time]=rundyn(PFFUN,DYNFUN,EVFUN,OPTIONS);

where PFFUN is a Matpower power flow data m-file or struct, DYNFUN an m-file or struct with dynamic data, and EVFUN an m-file or struct with the events such as faults. The OPTIONS vector is optional.


Examples: a simulation can be run by entering the following command at the Matlab prompt:

>> rundyn( 'case9','case9dyn','fault');

or

>> rundyn( 'casestagg','casestaggdyn','staggevent');

The EVFUN argument also accepts an empty matrix. The steady-state solution is then obtained:

>> rundyn( 'case9','case9dyn','[]');

Documentation

Download PDF file.

Links