Home > matpower6.0 > cpf_predictor.m

cpf_predictor

PURPOSE ^

CPF_PREDICTOR Performs the predictor step for the continuation power flow

SYNOPSIS ^

function [V_hat, lam_hat] = cpf_predictor(V, lam, z, step, pv, pq)

DESCRIPTION ^

CPF_PREDICTOR  Performs the predictor step for the continuation power flow
   [V_HAT, LAM_HAT] = CPF_PREDICTOR(V, LAM, Z, STEP, PV, PQ)

   Computes a prediction (approximation) to the next solution of the
   continuation power flow using a normalized tangent predictor.

   Inputs:
       V : complex bus voltage vector at current solution
       LAM : scalar lambda value at current solution
       Z : normalized tangent prediction vector from previous step
       STEP : continuation step length
       PV : vector of indices of PV buses
       PQ : vector of indices of PQ buses

   Outputs:
       V_HAT : predicted complex bus voltage vector
       LAM_HAT : predicted lambda continuation parameter

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [V_hat, lam_hat] = cpf_predictor(V, lam, z, step, pv, pq)
0002 %CPF_PREDICTOR  Performs the predictor step for the continuation power flow
0003 %   [V_HAT, LAM_HAT] = CPF_PREDICTOR(V, LAM, Z, STEP, PV, PQ)
0004 %
0005 %   Computes a prediction (approximation) to the next solution of the
0006 %   continuation power flow using a normalized tangent predictor.
0007 %
0008 %   Inputs:
0009 %       V : complex bus voltage vector at current solution
0010 %       LAM : scalar lambda value at current solution
0011 %       Z : normalized tangent prediction vector from previous step
0012 %       STEP : continuation step length
0013 %       PV : vector of indices of PV buses
0014 %       PQ : vector of indices of PQ buses
0015 %
0016 %   Outputs:
0017 %       V_HAT : predicted complex bus voltage vector
0018 %       LAM_HAT : predicted lambda continuation parameter
0019 
0020 %   MATPOWER
0021 %   Copyright (c) 1996-2016, Power Systems Engineering Research Center (PSERC)
0022 %   by Shrirang Abhyankar, Argonne National Laboratory
0023 %   and Ray Zimmerman, PSERC Cornell
0024 %
0025 %   This file is part of MATPOWER.
0026 %   Covered by the 3-clause BSD License (see LICENSE file for details).
0027 %   See http://www.pserc.cornell.edu/matpower/ for more info.
0028 
0029 %% sizes
0030 nb = length(V);
0031 
0032 Va = angle(V);
0033 Vm = abs(V);
0034 Va_hat = Va;
0035 Vm_hat = Vm;
0036 
0037 %% prediction for next step
0038 Va_hat([pv; pq]) = Va([pv; pq]) + step * z([pv; pq]);
0039 Vm_hat([pq])     = Vm([pq])     + step * z([nb+pq]);
0040 lam_hat = lam + step * z(2*nb+1);
0041 V_hat = Vm_hat .* exp(1j * Va_hat);

Generated on Fri 16-Dec-2016 12:45:37 by m2html © 2005