File Exchange

## PSO solution to economic dispatch

version 1.0 (49.4 KB) by

This program solves the economic dispatch problem by PSO toolbox developed by Brian birge.Two exampl

Updated

This software contains two examples psotest.m and psotest.1.By running the programs
(psotest.m or psotest1.m) as they are in the default pso1 folder the economic dispatch problem
can be solved. The allocation minimum fuel cost and transmission losses are determined.
3. I am using the PSOt, particle swarm optimization toolbox for matlab developed by Prof Brian
Birge(Reference).My sincere thanks to him for the efficient toolbox.
% the data matrix should have 5 columns of fuel cost coefficients and plant limits.
% 1.a (\$/MW^2) 2. b \$/MW 3. c (\$) 4.lower lomit(MW) 5.Upper limit(MW)
% This Example system is taken from the book Power System Analysis by Prof Haadi
%no of rows denote the no of plants(n)
clear
clc;
format long;
global data B B0 B00
data=[0.008 7 200 10 85
0.009 6.3 180 10 80
0.007 6.8 140 10 70];
B=.01*[.0218 .0093 .0028;.0093 .0228 .0017;.0028 .0017 .0179];
B0=0*[.0003 .0031 .0015];
Pd=150;
l=data(:,4)';
u=data(:,5)';
ran=[l' u'];
n=length(data(:,1));
Pdef = [100 100000 100 2 2 0.9 0.4 1500 1e-6 5000 NaN 0 0];
[OUT]=pso_Trelea_vectorized('f6',n,1,ran,0,Pdef);
out=abs(OUT)
P=out(1:n)
[F Pl]=f6(P')
The results
P =
32.88968876120133
64.59837992682773
54.85448624558800
F = 1.597481635286200e+003
Pl = 2.34255491258807
This solution is better than the solution given in the book
P=[33.4701 64.0974 55.1011];
F=1599.98
Reference:
Birge, B., 2003, PSOt, A Particle Swarm Optimization Toolbox for Matlab,
IEEE Swarm Intelligence Symposium Proceedings, April 24-26
ALL THE BEST

Manisha M

### Manisha M (view profile)

Can we open the code in mobile?
What is the app required to open it?

Tsai

### Tsai (view profile)

Sir,
B0=0*[.0003 .0031 .0015]
isn't that B0=[0 0 0]?
I modify B0=[.0003 .0031 .0015] and test .
The results
--> Solution likely, GBest hasn't changed by at least 1e-006 for 5000 epochs.
out =
1.0e+003 *
0.033512731173818
0.063813291344888
0.055338519338460
1.599985297825295
P =
33.512731173818437
63.813291344887588
55.338519338459697
F =
1.599985297825295e+003
Pl =
2.634018857165728
This solution is close to the original solution given in the book ex7.8 .

vydyam

### vydyam (view profile)

Sir,
I had run the program given by you in the PSo tool box it is givin gcorrect results for the 3 bus data given by you but for other data
like the one below
data=[0.001562 7.92 561 100 600
0.00194 7.85 310 100 400
0.00484 7.97 078 50 200];
B=[0.000075 0.000005 0.0000075
0.001940 0.000015 0.0000100
0.004820 0.0000100 0.0000450];
actual answer for the economic load dispatch with losses is 6878 0r in that range but it is showing around 250000
kindly help me in this regard

Erdal Bizkevelci

Nesrullah Salman

### Nesrullah Salman (view profile)

thanks

pedro salazar

necesito el codigo de programacion de (pso) en fortran o en otro programa

saloman danaraj

The penalty factor is chosen after verifying so many values.
Care is taken to get accuraccy.The accuracy ie sum(P)-Pl-Pd<1e-10.

Dimitri Shvorob

Well-meaning but novice work. Author: (a) you are presenting *penalized* objective function, not the actual one, and (b) your penalty factor doesn't seem very high: check that the constraint is actually met.

##### MATLAB Release
MATLAB 7.0.1 (R14SP1)