# power_loadflow

Perform positive-sequence load flow or unbalanced load flow and initialize models containing load flow blocks

## Syntax

## Description

computes the load flow of `LF`

= power_loadflow(`sys`

,'solve')`sys`

. The model is initialized with the load
flow solution.

**Note**

Before release R2021a, this function provided access to the machine tool
initialization. Although this is still possible, use this function in release R2021a and
later to initialize models containing electric machines. Although this function
continues to support the `-v2`

option, this option is no longer
required to perform load flows. You can remove this option from your scripts and M
functions.

`power_loadflow(`

computes
the load flow and opens the editor to save the load flow report.`sys`

,'solve','report')

`power_loadflow(`

adds
Load Flow Bus blocks to the model `sys`

,'AddBuses')`sys`

. The added blocks
are single-connector Load Flow Bus blocks, which specify bus parameters for a
positive-sequence load flow.

## Examples

## Input Arguments

## Output Arguments

## Algorithms

The `power_loadflow`

function computes the positive-sequence load flow
or the unbalanced load flow of a Simscape™
Electrical™ Specialized Power Systems model and initializes the load flow blocks to start
simulation in steady-state. Load flow blocks are Simscape
Electrical Specialized Power Systems blocks in which you can specify active power (P) and
reactive power (Q) to solve the positive-sequence load flow.

The `power_loadflow`

function uses the Newton-Raphson method to provide
a robust and fast convergence solution and offers most of the functionality of other load flow
software available in the power utility industry.

The `power_loadflow`

function applies the load flow solution to the
model by initializing these block parameters:

The

**Phase-to-phase voltage**and**Phase angle of phase A**parameters of Three-Phase Source blocksThe

**Positive-sequence: [Amplitude Phase]**parameter of Three-Phase Programmable Voltage Source blocksThe

**Nominal phase-to-phase voltage**parameter of Three-Phase Parallel RLC Load and Three-Phase Series RLC Load blocksThe

**Active and reactive power at initial voltage [Po Qo]**parameter and**Initial positive-sequence voltage Vo [Mag(pu) Phase (deg.)]**parameter of Three-Phase Dynamic Load blocksThe

**Initial Conditions [slip, th, ia,ib,ic, pha,phb,phc]**parameter of Asynchronous Machine blocksThe

**Initial conditions [dw th ia,ib,ic pha,phb,phc Vf ]**parameter of Synchronous Machine and Simplified Synchronous Machine blocks

The function also initializes the following parameters of the blocks that are connected to
the **Pm**, **Vf**, and **Tm** inputs of
the Synchronous Machine and Asynchronous Machine blocks:

The

**Constant value**parameter of Constant blocksThe

**Initial Value**parameter of Step blocksThe

**Initial mechanical power**parameter of Hydraulic Turbine and Governor blocksThe

**Initial power and generator rotor angle**of the Steam Turbine and Governor blocks

The type of load flow solution (positive-sequence or unbalanced) is determined by the Load Flow Bus blocks present in the model. For more information on how to use the Load Flow Bus blocks in your model, see Load Flow Bus.

## Version History

**Introduced before R2006a**