File Exchange

image thumbnail

Toolbox for Modeling and Analysis of Power Networks in the DQ0 Reference Frame

version (603 KB) by yoash levron
Analyzes the dynamics of symmetric power networks, generators, and loads in the DQ0 reference frame


Updated 14 Jan 2018

View License

The software manual and more downloads are available at
-- What this tool does
This is a free software tool for analyzing the dynamics of power systems based on dq0 signals. It is designed to simulate and analyze power systems that include several generators and loads, and possibly a large transmission network. The software provide tools for constructing dynamic models of the system components, and enables analysis in the frequency domain or the time domain. The manual and software provide simple explanations and examples that can help one get started.
-- When to use this software
Several approaches exist for modeling the dynamic behavior of three-phase power systems. Transient simulations that use the abc frame of reference describe the system by means of physical quantities, and thus offer high accuracy and flexibility. This approach is often the most general, since it applies to nonsymmetric systems, and is valid over a wide range of frequencies. Another popular approach is to model the power system using time-varying phasors, often by using the network power flow equations. This approach has many benefits, one of them is that the transmission network is described by means of purely algebraic equations. However, time-varying phasors are only applicable at low frequencies, under the assumption that the system is quasi-static.
A solution that complements these two well-known approaches is to model large power systems on the basis of dq0 quantities. This approach is not as general as abc-based models, and is advantageous mainly when the network and units are symmetrically configured. However, dq0 models combine two properties of interest: similar to transient models, dq0-based models are derived from physical models, and are therefore accurate at high frequencies, so the assumption of a quasi-static network is not required. In addition, similarly to time-varying phasors, dq0 models are time-invariant. This property allows to define an operating point, and enables small-signal analysis, and stability analysis.
-- How this software operates
(More details available at the software manual - see above).
The software describes power systems by means of signal-flow diagrams, in which each component is modeled by dq0 quantities. Transmission networks are represented by linear state-space models with voltage inputs and current outputs. The software automatically constructs the model matrices based on the network data. This can be done using the graphical user interface, or directly from the Matlab command line. The resulting state-space models are of minimal order, and use sparse system matrices, and are therefore suitable for large power systems. The network and its components are modeled using a dq0 transformation that is based on a unified reference frame.
-- Additional details on
** Installation
** Tutorial
** How to cite this work
are available in the software manual (see link above)
-- Contact
Any questions? please contact us at

Cite As

yoash levron (2020). Toolbox for Modeling and Analysis of Power Networks in the DQ0 Reference Frame (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (5)

Zaifu Wang

thank you


Sven Koerner


Added example: exSyncGenPVinv.m + exSyncGenPVinv_sim.slx

All Simulink files are updated to R2014b, to solve version issues.

Added example (pv_dq.m) demonstrating modeling of a three-phase photovoltaic inverter based on dq0 signals

updated examples

fixed typo in example droopB.m

Updated documentation

Major revision:
- Updated function names
- Clean the code
- Tutorial is added

updated function 'eliminate_buses' to handle an empty subset.

added example 'example_long_line_7bus.m'

Added another example: example_droop_B.m (droop control + central angle reference frame)

Added example 'example_droop_A' (basic droop control)

Updated website link

Updated documentation

added contact details

- New homepage & software manual

new function & example: longline_analytic.m , longline_analytic_ex.m

Added example - 'example_14bus_gen_and_renewables.m' - Dynamic simulation of the IEEE 14 bus test case network, with physical synchronous machine models and photovoltaic inverters (renewable sources).

Added example 'tst_sync_machine_II' that compares the transient responses of the physical and approximated synchronous machine models.

Added example file 'example_long_line_pv.m'

Updated implementation and examples for long transmission lines

updated documentation

Updated function 'step_sparse' to enhance the computation speed for very large systems.

Updated function 'step_sparse' to better handle large systems.
Step response is now computed much faster and with lower memory requirements.

-- A new example 'example_large_systems_stability.m' has been added.
-- Supporting functions such as 'step_sparse' have been added.
-- Implementation in function 'eliminate_buses' has been improved to support large systems.

Updated call to Simulink files to run better on older versions of Matlab.

updated typos in documentation. Files without change.

Added a new example:
'example_renewable_gen_parameters.m', 'example_renewable_gen_simulink.slx'
Simulates the dynamics of a small network that contain a renewable energy source, using dq0 signals.

Updated documentation, files without change

Documentation updated. Files without change.

Updated documentation. Files have not been changed.

Updated small typos in description. Files have not been changed.

MATLAB Release Compatibility
Created with R2014b
Compatible with any release
Platform Compatibility
Windows macOS Linux