Daline: A Generalized Data-driven Power Flow Linearization Platform
January 29, 2026 · View on GitHub

Daline: A Generalized Data-driven Power Flow Linearization Platform
Official Website: https://www.shuo.science/daline
Version: 1.1.7
Authors: Mengshuo Jia, Wen Yi Chan, Gabriela Hug
Affiliation: Power Systems Lab, ETH Zurich
Date: April 25, 2025
Copyright: © 2025, Mengshuo Jia and Gabriela Hug
Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. This file is offered as-is, without any warranty.
Introduction
Daline is a MATLAB toolbox for generalized data-driven power flow linearization in power systems research and education. Unlike traditional model-driven approaches, Daline uses system measurements to train linear models, accommodating realistic impacts like control actions and variable system parameters. It includes over 58 linearization methods and is designed to help users perform complex simulation and comparison tasks using just a few simple commands.
A glance
Generate, pollute, clean, and normalize (optimal) power flow data with numerous customization in one Daline command

Utilize or compare over 55 linearization methods using one line of code in Daline

Get accuracy ranking for any states of any methods by a simple Daline command

One simple command in Daline can tell you which method is faster

Or, one simple command in Daline can tell you which method is more scalable

Getting Started
System Requirements
- Compatible with 64-bit Linux, macOS, and Windows.
- Suggested but not mandatory: MATLAB version 2020b or later.
Installation
- Download the Daline116.zip file from the official website or GitHub.
- Unzip and move the folder to a desired location.
- Set the current folder to the Daline115 directory and run
daline_setupusing MATLAB
Running Daline
To execute some basic commands in Daline:
-
Data Generation:
data = daline.data('case.name', 'case14'); -
Fit Model:
model = daline.fit(data, 'method.name', 'PLS_SIM'); -
Rank Accuracy:
models = daline.rank(data, {'PLS_SIM', 'RR', 'LS_COD'}); -
Rank Time:
time = daline.time(data, {'QR', 'PLS_SIMRX', 'LS_COD'}); -
Complete Workflow:
model = daline.all('case118', 'method.name', 'RR_VCS', 'PLOT.style', 'light'); -
User Input Data:
data = load('user_pf_data.mat'); % User-provided power flow data in MATPOWER format model = daline.fit(data, 'method.name', 'RR', 'variable.predictor', {'P'}, 'variable.response', {'PF', 'Vm'}); beta = model.beta % Output: Linear model coefficient matrix
For more detailed usage instructions and additional examples, refer to the Daline User Manual in the doc folder.
Terms of Use
- Daline is distributed under the 3-clause BSD license from version 1.1.5 onwards.
- No warranty is provided.
- Refer to the LICENSE file for detailed conditions.
Citing Daline
Please cite Daline via the following reference when it is used in your work.
@article{Daline,
author = {Jia, Mengshuo and Chan, Wen Yi and Hug, Gabriela},
title = {Daline: A Data-driven Power Flow Linearization Toolbox for Power Systems Research and Education},
journal = {ETH Research Collection},
year = {2024},
url = {https://doi.org/10.3929/ethz-b-000681867},
doi = {10.3929/ethz-b-000681867}
}