psoc lab

18
POWER SYSTEM OPERATION AND CONTROL LAB M.TECH 1 st year POWER SYSTEMS

Upload: d-avi-na-sh

Post on 10-Nov-2015

12 views

Category:

Documents


0 download

DESCRIPTION

Lab work of power system operation and control

TRANSCRIPT

POWER SYSTEM OPERATION AND CONTROLLAB

M.TECH 1st yearPOWER SYSTEMS3141604

PROGRAM 1

% ECONOMIC LOAD DISPATCH USING OPTIMIZATION TOOLBOX% USING FMINCON % USE ACTIVE SET ALGORITHM c = [561 310 78]; b = [7.92 7.85 7.97]; a = [0.0016 0.00194 0.00482]; % c = [459 310 78]; % for 0.9 fuel cost of unit 1 % b = [6.48 7.85 7.97]; % a = [0.00128 0.00194 0.00482];pmin = [150; 100; 50];P0 = [400; 300; 150]; pmax = [600; 400; 200]; pd = 850 ;ngen = length(a);Aeq = [1 1 1];Beq = 850;Bl = [0.00003;0.00009;0.00012];options = optimset('Algorithm','Active-Set'); % Following command gives ED solution WITH LOSSES taking account of% @(P)eldcon(P,pd) [x3, fval3, flag3,output3,lambda3] = fmincon(@(P)eld(a,b,c,P),P0,[],[],[],[],pmin,pmax,@(P)eldcon(P,pd),options)Ploss = Bl(1)*x3(1)^2 + Bl(2)*x3(2)^2 + Bl(3)*x3(3)^2 ; % Following command gives ED solution WITH OUT LOSSES taking account of% Aeq Beq [x2, fval2, flag2,output2,lambda2] = fmincon(@(P)eld(a,b,c,P),P0,[],[],Aeq,Beq,pmin,pmax,[],options) % Following command gives ED solution WITH OUT GENERATOR LIMITS & WITH OUT% LOSSES BASIC ED WITH ONLY POWER BALANCE [x1, fval1, flag1,output1,lambda1] = fmincon(@(P)eld(a,b,c,P),P0,[],[],Aeq,Beq,[],[],[],options)

function [c, ceq] = eldcon(P,pd)c = [];Bl = [0.00003;0.00009;0.00012];ceq = [1 1 1]* [P(1);P(2);P(3)] - pd - [Bl(1) Bl(2) Bl(3)]*[P(1)^2;P(2)^2;P(3)^2] ;

function [f, df, d2f] = eld(a,b,c,P)f = 0; for i = 1:3 f = f + a(i)*P(i)^2 + b(i)*P(i) + c(i);endfor i = 1:3 df(i,1) = 2*a(i)*P(i) + b(i) ;endd2f = [2*a(1) 0 0;0 2*a(2) 0;0 0 2*a(3)] ;

RESULT

ED_OPT

Local minimum possible. Constraints satisfied.

fmincon stopped because the predicted change in the objective functionis less than the default value of the function tolerance and constraints are satisfied to within the default value of the constraint tolerance.

No active inequalities.

x3 =

430.9312 302.9153 132.0759

fval3 =

8.3517e+03

flag3 =

5

output3 =

iterations: 11 funcCount: 44 lssteplength: 1 stepsize: 1.7493e-04 algorithm: 'medium-scale: SQP, Quasi-Newton, line-search' firstorderopt: 1.1177e-06 constrviolation: 3.4584e-09 message: [1x772 char]

lambda3 =

lower: [3x1 double] upper: [3x1 double] eqlin: [0x1 double] eqnonlin: 9.5458 ineqlin: [0x1 double] ineqnonlin: [0x1 double]

Local minimum possible. Constraints satisfied.

fmincon stopped because the predicted change in the objective functionis less than the default value of the function tolerance and constraints are satisfied to within the default value of the constraint tolerance.

No active inequalities.

x2 =

388.1584 338.1784 123.6632

fval2 =

8.2002e+03

flag2 =

5

output2 =

iterations: 7 funcCount: 28 lssteplength: 1 stepsize: 0.0049 algorithm: 'medium-scale: SQP, Quasi-Newton, line-search' firstorderopt: 1.4674e-05 constrviolation: 1.1369e-13 message: [1x772 char]

lambda2 =

lower: [3x1 double] upper: [3x1 double] eqlin: 9.1621 eqnonlin: [0x1 double] ineqlin: [0x1 double] ineqnonlin: [0x1 double]

Local minimum possible. Constraints satisfied.

fmincon stopped because the predicted change in the objective functionis less than the default value of the function tolerance and constraints are satisfied to within the default value of the constraint tolerance.

x1 =

388.1584 338.1784 123.6632

fval1 =

8.2002e+03

flag1 =

5

output1 =

iterations: 7 funcCount: 28 lssteplength: 1 stepsize: 0.0049 algorithm: 'medium-scale: SQP, Quasi-Newton, line-search' firstorderopt: 1.4674e-05 constrviolation: 1.1369e-13 message: [1x772 char]

lambda1 =

lower: [3x1 double] upper: [3x1 double] eqlin: 9.1621 eqnonlin: [1x0 double] ineqlin: [1x0 double] ineqnonlin: [1x0 double]

PROGRAM 2Economic load dispatch using Lambda iterative technique

a = [561 310 78]; % a = [459 310 78]; % for 0.9 fuel cost of unit 1b = [7.92 7.85 7.97]; % b = [6.48 7.85 7.97];c = [0.0016 0.00194 0.00482]; % c = [0.00128 0.00194 0.00482];pmin = [150 100 50];pmax = [600 400 200];ngen = length(a); % calculating maximim and minimum incremental costs ICmin = 10^6; ICmax = 0; % initialisation of maximum and minimum incremental costs of the system % IC is Incremental Cost for i = 1:ngen icmin(i) = b(i) + 2*c(i)*pmin(i); icmax(i) = b(i) + 2*c(i)*pmax(i); if(icmin(i) < ICmin) ICmin = icmin(i); end if(icmax(i) > ICmax) ICmax = icmax(i); endend icrange = ICmax - ICmin ;icdel = icrange/2 ;icinitial = ICmin + icdel ; lambda = icinitial ;pg = 0 ; % total generation initial totalcost = 0;pd = 850; tol = 0.01; iter = 0; while (abs(pg - pd) > tol) pg = 0; totalcost = 0; for i = 1:ngen if lambda < icmin(i) p(i) = pmin(i); elseif lambda > icmax(i) p(i) = pmax(i); else p(i) = (lambda - b(i))/(2*c(i)); end pg = pg + p(i) ; totalcost = totalcost + a(i) + b(i)*p(i) + c(i)*p(i)^2; end if pg < pd lambda = lambda + icdel ; icdel = icdel/2 ; end if pg > pd lambda = lambda - icdel; icdel = icdel/2; end iter = iter + 1;end

disp(' p1 p2 p3 Lambda ');disp([ p(1) p(2) p(3) lambda ]) ;

Result p1 p2 p3 Lambda 388.1640 338.1765 123.6644 9.1621

PROGRAM 3Economic Load dispatch using Newton method

% ELD USING NEWTON METHOD a = [561 310 78]; % a = [459 310 78]; % for 0.9 fuel cost of unit 1b = [7.92 7.85 7.97]; % b = [6.48 7.85 7.97];c = [0.0016 0.00194 0.00482]; % c = [0.00128 0.00194 0.00482];ngen = length(a); pl = 850; % initial lambda LinitLinit = input(enter initial guess of lambda); delP = 10; cc = 0; iter = 0; while abs(delP) > 0.01 for I = 1:ngen P(i) = (Linit b(i))/(2*c(i)) ; end delP = pl sum(P) ; for I = 1:ngen cc = cc + 1/(2*c(i)) ; end ell = delP/cc ; Linit = Linit + ell ; iter = iter +1 ; disp([P(1) P(2) P(3) delP Linit]);end

RESULTenter initial guess of lambda 6 1.0e+03 * p1 p2 p3 delP Lambda -0.6000 -0.4768 -0.2044 2.1312 0.0092

388.1617 338.1746 123.6636 -0.0000 9.1621EXPERIMENT 4AIM To determine the frequency deviation of an isolated single area system with respect to changing load, without considering the governor effect.

DataTurbine time constant 0.5 secGenerator and load time constant 10 secChange in load is 0.2 puRegulation coefficient is 1/20

Result

EXPERIMENT 5AIMTo determine the frequency deviation with the load change including the governor effect

DataTurbine time constant 0.5 secGenerator and load time constant 10 secChange in load is 0.2 puRegulation coefficient is 1/20Governor time constant 0.2 sec

Result

EXPERIMENT 6AIMTo determine the frequency deviation with respect to change in load demand with the effect of PI controller in the feed back loop

DataTurbine time constant 0.5 secGenerator and load time constant 10 secChange in load is 0.2 puRegulation coefficient is 1/20Governor time constant 0.2 secIntegrator gain 7

Result