Skip to main content

Z-tool

Z-tool is a Python-based implementation for the frequendy-domain stability analysis of modern power systems. The core functionalities are measurement/characterization of EMT models in the frequency domain and small-signal stability assessment. The analysis relies on an existing system model in the EMT simulation software PSCAD and/or input frequency response data.

The following features are currently implemented and validated:

  • Voltage perturbation-based admittance scan at several nodes, including converter-based systems and black-box components, via frequency_sweep
  • Stability assessment via Generalized Nyquist Criteria applicable to standalone-stable MIMO systems
  • Oscillation mode identification via closed-loop eigenvalue decomposition and bus participation factors, EVD
  • Passivity assessment and small gain theorem application
  • Sensitivity of the Nyquist loci with respect to the components' admittance via loci_sensitivity
  • Automated stability analysis building the system matrices and computing previous and more metrics via stability_analysis
  • Frame conversion functions, e.g. from dq-frame to alpha/beta-frame and to positive/negative sequence

The flowchart below summarizes a common usage of the tool for stability studies, including frequency-domain system identification (frequency_sweep) and several stability analysis functions (stability):

Tool flowchart Tool summary

Installation

To use the toolbox, the following pre-requisites are needed.

  1. Python 3.7 or higher together with
  2. PSCAD v5 or higher is recommended.
  3. Install the Z-tool via cmd py -m pip install ztoolacdc or using the repository files. Similarly, cmd py -m pip install ztoolacdc --upgrade updates the package.

Usage

A generic usage of the package can be summarized in the following steps:

  1. Add the Z-tool PSCAD library to your PSCAD project
  2. Place the tool's scan blocks at the target buses and name them uniquely
  3. Define the resulting connectivity of the scan blocks (only for multi-infeed analyses)
  4. Specify the basic simulation settings and frequency range for the study
  5. Run the frequency scan and small-signal stability analysis functions

Follow the example(s) described here for more guidance. More details on the approach and implemented functions can be found in the papers below and/or this webinar with the complementary slides. The GUI is currently under development.

Other features

  • Transfer function scan via the frequency_sweep_TF function, see the example here
  • Change of PSCAD component values for parametric studies, see the example here
  • Rational fitting via least-squares optimization with the mode_estimation function, see the example here
  • Alternative computation of participation factors, e.g. extended PFs via EVD
  • Singular value (sigmas) computation for the sensitivity and complementary sensitivity functions with small_gain
  • Exploit the symmetric properties of the system to reduce the scan time (optional)
  • Base conversion for the analysis of systems with different voltage levels in stability_analysis
  • Linear interpolation of the node and edge matrices for increased frequency resolution in stability_analysis
  • PSCAD control arguments: disabling unnecessary outputs, clear temporary files, keep PSCAD open, retain certificate, etc.
  • Previous snapshots can be re-used to speed-up simulations
  • Snapshot simulation plots for a quick look into the initialization run

Citing Z-tool

If you find the Z-tool useful in your work, we kindly request that you cite the following publications, which you can freely access here and here.

@INPROCEEDINGS{Cifuentes2024,
  author={{Cifuentes Garcia}, Francisco Javier and Roose, Thomas and Sakinci, Özgür Can and Lee, Dongyeong and Dewangan, Lokesh and Avdiaj, Eros and Beerten, Jef},
  booktitle={2024 IEEE PES Innovative Smart Grid Technologies Europe (ISGT EUROPE)}, 
  title={Automated Frequency-Domain Small-Signal Stability Analysis of Electrical Energy Hubs}, 
  year={2024},
  pages={1-6},
  doi={10.1109/ISGTEUROPE62998.2024.10863484}}
@article{Cifuentes2025,
author = {Francisco Javier {Cifuentes Garcia} and Jef Beerten},
title = {Z-Tool: Frequency-domain characterization of EMT models for small-signal stability analysis},
journal = {Electric Power Systems Research},
volume = {252},
pages = {112405},
year = {2026},
doi = {https://doi.org/10.1016/j.epsr.2025.112405}}

Contact Details

For queries about the package or related work please feel free to reach out to Fransciso Javier Cifuentes Garcia. You can find more open-source tools for power systems analysis in the etch website.

License

This is a free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Z-tool is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. See the GNU General Public License for more details.

Contributors

  • Francisco Javier Cifuentes Garcia: Main developer
  • Thomas Roose: Initial stability analysis functions
  • Jeroen Tant, Jan Kircheis, Eros Avdiaj and Özgür Can Sakinci: Validation and support

Future work

  • Scans in split projects
  • Switch between current and voltage perturbation
  • Computation of stability margin

Metadata

Release files for ztoolacdc 0.1.55

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ztoolacdc 0.1.55
File Size Uploaded Provenance Actions
ztoolacdc-0.1.55.tar.gz 135.9 kB Without provenance Details for ztoolacdc-0.1.55.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ztoolacdc 0.1.55
File Interpreter ABI Platform Actions
ztoolacdc-0.1.55-py3-none-any.whl Python 3 none any Details for ztoolacdc-0.1.55-py3-none-any.whl

Total release size: 275.5 kB

Release files / ztoolacdc-0.1.55.tar.gz

Download URL ztoolacdc-0.1.55.tar.gz
Size 135.9 kB
Tags Source
SHA-256 checksum
How to use checksums
f2335d6f3e9fcea15015de67b2fbd9907fdcddb27b81e408874bd65a09d7f9ca
BLAKE2b-256 checksum
How to use checksums
d57b971497678a178636934dcc661621e8172a46661478bfec1d6265b40b1755
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.16

Release files / ztoolacdc-0.1.55-py3-none-any.whl

Download URL ztoolacdc-0.1.55-py3-none-any.whl
Size 139.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
009458bcccadf681775b107ad816a15231d77bc28a2a754d172daa48b8072cf7
BLAKE2b-256 checksum
How to use checksums
26212f1e186c8cfdd24ea386a81d8b64f56ec2bc1222982b068544529656fc91
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.16

Security for ztoolacdc 0.1.55

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.55 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page