Products & Services Solutions Academia Support User Community Company

Learn more about SimPowerSystems   

power_loadflow - Perform machine load flow and initialization for models containing three-phase machines and dynamic load blocks

Syntax

power_loadflow('sys')
lfparam = power_loadflow('sys')
lf = power_loadflow('sys',lfparam)
lf = power_loadflow('sys','default')

Description

power_loadflow('sys') opens the Machine Load Flow Tool dialog box to perform machine load flow and initialization. This tool can also be activated from the Powergui block dialog box by selecting Load Flow and Machine Initialization.

lfparam = power_loadflow('sys') returns the most recent load flow parameter values of a model. lfparam can be used as a template variable to compute new machine load flow.

lf = power_loadflow('sys',lfparam) computes the machine load flow using the load flow parameters given in lfparam. The MathWorks recommends that you create an instance of lfparam using lfparam = power_loadflow('sys'), and edit the load flow parameter values based on this template.

lf = power_loadflow('sys','default') computes the machine load flow using the default load flow parameter values. The default load flow parameters are returned by lfparam = power_loadflow('sys').

Load Flow Parameters

Load flow parameters of a model are organized in a structure with the following fields:

FieldDescription
nameCell array of string values defining the names of the machine blocks of the model
typeCell array of string values ('Asynchronous Machine', 'Simplified Synchronous Machine', 'Synchronous Machine', and/or 'Three Phase Dynamic Load') defining the mask type of the machine and load blocks
setStructure with variable fields defining the load flow parameters specific to each machine or dynamic load (Bus Type, Terminal Voltage, Active Power, Reactive Power, Mechanical Power) parameter defining the desired load flow frequency, in hertz. The frequency is specified only in the first element of the load flow parameters structure.
LoadFlowFrequencyParameter defining the desired load flow frequency, in hertz. The frequency is specified only in the first element of the load flow parameters structure.
InitialConditionsString value defining the load flow initial condition type ('Auto','Start from previous solution'). The initial condition status is specified only in the first element of load flow parameter structure.

For example, you obtain the load flow parameters for the power_machines demo by doing:

lfparam = power_loadflow('power_machines');
lfparam(1)
                 name: 'SM 3.125 MVA'
                 type: 'Synchronous Machine'
                  set: [1x1 struct]
    LoadFlowFrequency: 60
    InitialConditions: 'Auto'
lfparam(2)
                 name: 'ASM 2250HP'
                 type: 'Asynchronous Machine'
                  set: [1x1 struct]
    LoadFlowFrequency: []
    InitialConditions: []

If you use the lfparam = power_loadflow('sys') command to create the load flow parameters structure, you do not need to edit or modify the name and type fields of lfparam. The set field is where you specify new load flow parameter values, lfparam(1).LoadFlowFrequency is where you defined the load flow frequency, and lfparam(1).Initialconditions is where you specify the initial conditions status.

If your model does not contain any Asynchronous, Simplified Synchronous, or Synchronous Machine blocks and no Three Phase Dynamic Load blocks, lfparam returns an empty variable.

Load Flow Parameters of Asynchronous Machine Block

For the Asynchronous Machine blocks, you can only specify the desired mechanical power of the machine. The set field is a structure with the field:

FieldDescription
MechanicalPowerThe desired mechanical power, in watts, of the machine

For example, the mechanical power of the Asynchronous Machine in the power_machines demo is given by:

lfparam = power_loadflow('power_machines');
lfparam(2).set
ans = 
    MechanicalPower: 1492000

Load Flow Parameters of Synchronous Machine Blocks

For the Simplified Synchronous Machine and Synchronous Machine blocks, the set field is a structure with the fields:

FieldDescription
BusTypeA string ('P & V generator', 'P & Q generator', or 'Swing bus') defining the desired bus type of the machine
TerminalVoltageParameter defining the desired terminal voltage, in volts rms
ActivePowerParameter defining the desired active power, in watts
ReactivePowerParameter defining the desired reactive power, in vars
PhaseUanParameter defining the desired phase voltage, in degrees, of the Uan voltage

For example, the load flow parameter values of the Synchronous Machine block in the power_machines demo are given by:

lfparam = power_loadflow('power_machines');
lfparam(1).set
ans = 
            BusType: 'P & V generator'
    TerminalVoltage: 2400
        ActivePower: 0
      ReactivePower: 0
           PhaseUan: 0

Load Flow Parameters of Three-Phase Dynamic Load Block

For the Three-Phase Dynamic Load blocks, the set field is a structure with the fields:

FieldDescription
ActivePowerParameter defining the desired active power, in watts
ReactivePowerParameter defining the desired reactive power, in vars

Load Flow Solution

The load flow results are organized in a structure with the fields:

FieldDescription
statusThe load flow status returns 1 when a solution is found, and returns 0 when no solution is found. Note that the load flow status is given only in the first element of the load flow structure, it returns an empty value for the other elements.
MachineThe names of the machines or loads
NominalThe nominal parameters [Nominal power, nominal voltage] of the machines or loads
BusTypeThe bus type of the machines or loads
UanPhaseThe phase angles, in degrees, of the phase A-to-neutral voltage at machine or load terminals
Uab,Ubc,UcaThe steady-state phase-to-phase terminal voltages of the machines or loads. The voltages are returned in a 1-by-3 vector containing the voltage in volts, the voltage in pu based on the nominal power of the machine, and the phase in degrees.
Ia,Ib,IcThe steady-state phase currents of the machines or loads. The currents are returned in a 1-by-3 vector representing the current in amperes, the current in pu based on the nominal power of the machine, and the phase in degrees.
PThe active power of the machine is returned in a 1-by-2 vector, representing the power in watts and in pu based on the nominal power of the machine.
QThe reactive power of the machine is returned in a 1-by-2 vector, representing the power in vars and in pu based on the nominal power of the machine
PmecThe mechanical power of the machine is returned in a 1-by-2 vector, representing the mechanical power in watts and in pu based on the nominal parameters of the machine.
TorqueThe mechanical torque of the machine is returned in a 1-by-2 vector, representing the torque in N.m and in pu based on the nominal power and speed of the machine.
VfThe computed field voltage of Synchronous Machine blocks. This parameter is set to an empty value for the other types of machines and loads.
SlipThe computed slip of Asynchronous Machine blocks. This parameter is set to an empty value for the other types of machines and loads.

Example

The power_machines demo illustrates a rated 2250 HP, 2.4 kV asynchronous motor connected on a 25 kV distribution network. The motor develops a mechanical power of 2000 HP (1.492 MW). You want to change its mechanical power to -1.0 MW (generator mode) and perform a new machine load flow to initialize the machine initial currents and start the simulation in steady-state:

lfparam = power_loadflow('power_machines');
lfparam(2).set
ans = 
    MechanicalPower: 1492000
lfparam(2).set.MechanicalPower = -1e6;
lf = power_loadflow('power_machines',lfparam);
lf(1)
ans = 
      status: 1
     Machine: 'SM 3.125 MVA'
     Nominal: [3125000 2400]
     BusType: 'P & V generator'
    UanPhase: -30.3047
         Uab: [2.4000e+003 1.0000 -0.3047]
         Ubc: [2.4000e+003 1.0000 -120.3047]
         Uca: [2.4000e+003 1.0000 119.6953]
          Ia: [140.1689 0.1865 -120.3047]
          Ib: [140.1689 0.1865 119.6953]
          Ic: [140.1689 0.1865 -0.3047]
           P: [-5.8208e-011 -1.8626e-017]
           Q: [5.8267e+005 0.1865]
        Pmec: [391.1104 1.2516e-004]
      Torque: [2.0749 1.2516e-004]
          Vf: 1.2909
        Slip: []
lf(2)
ans = 
      status: []
     Machine: 'ASM 2250HP'
     Nominal: [1678500 2400]
     BusType: 'Asynchronous Machine'
    UanPhase: -30.3047
         Uab: [2.4000e+003 1.0000 -0.3047]
         Ubc: [2.4000e+003 1.0000 -120.3047]
         Uca: [2.4000e+003 1.0000 119.6953]
          Ia: [268.7636 0.6656 177.3268]
          Ib: [268.7636 0.6656 57.3268]
          Ic: [268.7636 0.6656 -62.6732]
           P: [-9.8981e+005 -0.5897]
           Q: [5.1815e+005 0.3087]
        Pmec: [-1000000 -0.5958]
      Torque: [-5.2844e+003 -0.5934]
          Vf: []
        Slip: -0.0039

First, note that lf(1).status is set to 1, meaning that power_loadflow has found a solution for the given load flow parameters.

Take a look a the model and note that the mechanical torque reference input for the Asynchronous machine is now set to –5284.43 watts and the slip is S = –0.0039, meaning that the machine now behaves as a generator instead of a motor. Run the simulation and verify that it starts in steady-state.

Dialog Box

An alternative way to compute machine load flow is to specify the load flow parameters using the Machine Load Flow Tool dialog box. This tool can be activated by entering the power_loadflow('sys') command, or from the Powergui block dialog box by selecting Load Flow and Machine Initialization.

Machines

Displays the names of the Simplified Synchronous Machines, the Synchronous Machines, the Asynchronous Machine, and the Three-Phase Dynamic Load blocks of your model. Select a machine or a load in the list box in order to set its parameters for the load flow.

Bus type

If Bus type is set to P&V Generator, you can set the desired terminal voltage and active power of the machine. If Bus type is set to PQ generator, you can set the desired active and reactive powers. If Bus type is set to Swing Bus, you can set the desired terminal voltage, enter an active power guess, and specify the phase of the UAN terminal voltage of the machine.

If you select an Asynchronous Machine block machine, you only have to enter the desired mechanical power delivered by the machine. If you select a Three-Phase Dynamic Load block, you have to specify the active and reactive powers consumed by the load.

Terminal voltage UAB

Specify the terminal line-to-line voltage of the selected machine.

Active power

Specify the active power of the selected machine or load.

Active power guess

Specify active power guess to start iterations when the specified machine bus type is Swing Bus.

Reactive power

Specify the reactive power of the selected machine or load.

Phase of UAN voltage

This parameter is activated only when the bus type is Swing Bus.

Specify the phase of the phase-to-neutral voltage of phase A of the selected machine.

Mechanical power

In motor mode, specify the mechanical power developed by the squirrel cage induction machine. In generator mode, specify the mechanical power absorbed by the machine as a negative number.

Load flow frequency

Specify the frequency to be used in the load flow calculations (normally 60 Hz or 50 Hz).

Load flow initial condition

Normally, you should keep the default setting Auto to let the load flow automatically adjust the initial conditions before starting iterations. If you select Start from previous solution, the load flow starts with initial conditions corresponding to the previous solution. Try this option if the load flow fails to converge after a change has been made to the power and voltage settings of the machines or to the circuit parameters.

Update Circuit & Measurements

Update the list of machines, voltage and current phasors, as well as the powers in the load flow window if you have made a change in your model while the load flow window is open. The new voltages and powers displayed in the load flow window are computed by using the machine currents obtained from the last load flow (the three currents stored in the Initial conditions parameter of the machine blocks).

Update Load Flow

Executes the load flow calculations for the given load flow parameters.

  


Related Products & Applications

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS