I am working on a fuzzy logic program which reduces the tie-line power flow
and frequency deviation. I have made line 4-5 a tie-line.
What I'm trying to do right now is, I'm decreasing the load on bus 5
manually, and then I want to decrease the generation of gen-3 by for loop.
I did find my that mistake "mpc" later on. But I am still facing issues
with loop.
Can you please suggest me how should I run a loop so that the difference
between old tie-line power (108.something) and new tieline power after
reducing the load gets minimized?
I have attached the code which I'm using. I am goofing up in loop. Kindly
advise.
mpc= loadcase (case92)
[MVAbase, bus, gen, branch, success, et]=runpf (mpc)
bus(3,5)=81
a=branch(2,14)
b=mpc.gen(3,2)
%for i=1:1:5
%repeat
%while(108.7829-a>5)
for i=1:1:4
if ((108.78-mpc.branch(2,14))<5)
a=branch(2,14)
b=mpc.gen(3,2)
mpc.gen(3,2)=b-2
runpf (mpc)
else
end
end
mpc.gen(3,2)
%b=mpc.gen(3,2)-2
%runpf (case92)
%end
%mpc.gen(3,2)
On Fri, Dec 13, 2013 at 2:08 PM, Shri <[email protected]> wrote:
> Pass the casestruct 'mpc' instead of the filename 'case92' to runpf
>
> runpf(mpc);
>
> What problem are you trying to solve by decreasing the line flow? Maybe we
> could suggest a better for what you are trying to do.
>
> Shri
> On Dec 13, 2013, at 11:25 AM, Nirav Shah wrote:
>
> > I have saved as case9 file with the new name case92.
> > I am using this code to decrease my line flow of 4-5. For that I need to
> decrease the generation 3, but it's not decreasing with this code.
> >
> > Please help me.
> >
> > mpc= loadcase (case92)
> > [MVAbase, bus, gen, branch, success, et]=runpf (case92)
> > a=branch(2,14)
> > b=mpc.gen(3,2)
> > mpc.gen (3,2)=50;
> > runpf (case92)
> > for i=1:1:1000
> > if (108.7829-a>0.2)
> > mpc.gen(3,2)=b-2
> > runpf (case92)
> > a=branch(2,14)
> > b=mpc.gen(3,2)
> > end
> > end
> > mpc.gen(3,2)
> >
>
>
>
>