Home > matpower7.1 > extras > maxloadlim > examples > example_ieee9.m

example_ieee9

PURPOSE ^

EXAMPLE_IEEE9 Examples of using maximum loadability limit (MLL) search with

SYNOPSIS ^

This is a script file.

DESCRIPTION ^

EXAMPLE_IEEE9 Examples of using maximum loadability limit (MLL) search with 
   the IEEE 9

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 %EXAMPLE_IEEE9 Examples of using maximum loadability limit (MLL) search with
0002 %   the IEEE 9
0003 
0004 %   MATPOWER
0005 %   Copyright (c) 2015-2016, Power Systems Engineering Research Center (PSERC)
0006 %   by Camille Hamon
0007 %
0008 %   This file is part of MATPOWER/mx-maxloadlim.
0009 %   Covered by the 3-clause BSD License (see LICENSE file for details).
0010 %   See https://github.com/MATPOWER/mx-maxloadlim/ for more info.
0011 
0012 %addpath('../');
0013 
0014 % Loading the system and defining parameters
0015 mpc = loadcase('case9'); % load ieee9
0016 dir_mll = [0 0 0 0 0 0 1 0 0]'; % define direction of load increase
0017 
0018 %% With reactive power limits (default)
0019 % Running the search for MLL with verbose set to 1 to print the results.
0020 results_mll = maxloadlim(mpc,dir_mll,'verbose',1); %
0021 
0022 %% Without enforcement of the reactive power limits.
0023 % The reactive power limits are not enforced in the following example.
0024 results_mll = maxloadlim(mpc,dir_mll,'verbose',1,'use_qlim',0);
0025 
0026 % The same MLL point can be obtained by MATPOWER implementation of the CPF.
0027 define_constants;
0028 mpc_target = mpc;
0029 nonzero_loads = mpc_target.bus(:,PD) ~= 0;
0030 Q_P = mpc_target.bus(nonzero_loads,QD)./mpc_target.bus(nonzero_loads,PD);
0031 mpc_target.bus(:,PD) = mpc_target.bus(:,PD)+2*dir_mll*mpc_target.baseMVA;
0032 mpc_target.bus(nonzero_loads,QD) = Q_P.*mpc_target.bus(nonzero_loads,PD);
0033 % Run the CPF with matpower
0034 [results,~] = runcpf(mpc,mpc_target);

Generated on Fri 09-Oct-2020 11:21:31 by m2html © 2005