The purpose of this exercise is to

  1. Construct a network residual model in MATLAB
  2. Solve network algebraic equations using MATLAB function fsolve
  3. Construct an DAE model of a network load in MATLAB
  4. Compute the time response using the implicit solver ode15i

STEP 1

Download loadFlowOne.m, the residual function constructed in lecture and extend it to the full network. The first line of your function should be: [r,J] = dNetwork(x,s,z,p)

The inputs are defined as follows: %x: network voltages; x = [V2R V2I V3R V3I]; %s: network injections; s = [-4 3]; %z: dynamic parameters; z = [1 1]; %p: static parameters; p = [X1 X2 Vm Vp nsT Qm Qp nsC];

The static parameters have the following values: X1 = 0.03; X2 = .05; Vm = .98; Vp = 1.02; Qm = -.25; Qp = .25; nsT = 0.025; nsC = .2;

The outputs are defined as follows: %r: residual; %J: Jacobian of the residual; J = dr/dx



STEP 2

Compute the voltages V2 and V3 using the following command: Vn = fsolve(@(x)dNetwork(x,s,z,p),[V2R0 V2I0 V3R0 V3I0],optimoptions('fsolve','Jacobian','on','tolx',1e-12,'tolfun',1e-6,'display','off'));

Use the flat start for the initial voltage values, i.e., V2R0 = 1; V3R0 = 1; V2I0 = 0; V3I0 = 0;

The result should be: Vn = [0.9846 0.0300 0.9651 -0.1229];



STEP 3



STEP 4