Optimal DG placement is beyond the scope of MatPower as it is a binary optimization problem. I believe MatPower does not have support for MILP but Ray would be able to comment on it conclusively. As for optimizing the size (capacity), you could run an optimization (runopf) with the maximum load the system can handle. Determining the maximum load is a tricky issue as it encompasses a gamut of ways in which you could increase the load. Pick a direction for load increase that suits your problem. I believe MatPower has a routine by which you can increase the load at all the buses with the load power factor held constant. This optimization would give you the optimal size for the DG but _not_ the optimal power factor. For obtaining optimal power factor of the DG, one way is to include minimization of the reactive power of the DG in the OPF objective function. You can do this by adding the generator cost data for the reactive power in mpc.gencost field of the data file. Most of the MatPower cases (may be all) have cost data only for generator real power and hence the row size of gencost is ngen. One can also specify the cost associated with reactive power in rows ngen+1:2*ngen making the row size of gencost 2*ngen. (See page 88 of the manual). In your case, you would want to put zeros in all the rows for reactive power cost except the one for the DG. Assuming you are using a 2nd order polynomial cost function for the DG of the form alpha*Qg^2 + beta*Qg + gamma, alpha=gamma=0 and beta=1 for the DG reactive power cost row.
Hope this helps, Shri On Nov 13, 2013, at 9:29 AM, 小柳拓也 wrote: > Thanks Ray > > But I only use runpf.m as power flow calculation tool. > I insert distributed generator at optimal location and optimal size in > my study. > These two factors are treated by matpower using manual appendix B. > For example when inserting 100MW DG at bus2, I change "mpc.bus(2,BUS_ > TYPE)=2, mpc.gen(,PG)=100...". > > Journal I have read decide optimal location, optimal size and "optimal > DG power factor", but in manual appendix B how to change power factor of > generator is not written. > > I want to optimize location , size and power factor. > Can matpower treat power factor of generator? > > regards, > > ----- Original Message ----- >> If you mean that you would like to constrain the power factor of a > distributed generator to remain constant as it gets redispatched by the > OPF, then, yes, it is possible. You will have to add a user-defined > linear equality constraint for each distributed generator. This is > already done for dispatchable loads, so you could probably re-use some > of the code in makeAvl.m (see also lines 168 and 245 of opf_setup.m). > You’ll also want to become familiar with extending the OPF formulation > as described in sections 5.3 and 6 of the User’s Manual). >> >> -- >> Ray Zimmerman >> Senior Research Associate >> B30 Warren Hall, Cornell University, Ithaca, NY 14853 >> phone: (607) 255-9645 >> >> >> >> On Nov 13, 2013, at 5:08 AM, 小柳拓也 <x0t1...@students.chiba-u.jp> > wrote: >> >>> Hello, >>> >>> I have a question about power factor. >>> >>> I have read many journal about distributed generator insertion. >>> >>> Journal I have read treat power factor of distributed generator. >>> >>> I want to treat power factor of distributed generator, but how to > treat >>> power factor of distributed generator is not written in matpower's >>> manual. >>> >>> On matpower, can treating power factor of distributed generator be >>> possible? >>> >>> If that is possible, please tell me how to treat power factor of >>> distributed generator. >>> >>> Regards, >>> >>> >>> Takuya Koyanagi >>> x0t1...@students.chiba-u.jp >>> >>> >>> >>> >>> >>> >>> >> >> > > >