Power balance in a microgrid

I am trying to optimize the sizing of a microgrid which caters for the demand with renewables (solar PV and wind), diesel generator (DG) and a battery. It has a dump load, to absorb excess generation if exists after catering the power demand and charging the battery. I use the power balance equation as follows (which is an equality constraint in the optimization problem). Here, at any time step (k), power balance equation is as follows. U_dg is a binary variable to denote the switch on/off condition of the DG. I have formed the power balance (total generation = total demand) as a part of 'nonlinconstr' function.
I have used the static penalty approach to handle the constraints. My final fitness function is defined as Fitness_function = Fitness_function + nonlinconstr(x); However, I observed that, this equality constraint is always violated and therefore, I get extremely high costs for the fitness function.
I realized that similar problems have been solved by many researchers. It is much appreciated, if someone can assist me in solving this issue.
Is there any other way to approach this, other than the static penalty approach?
% total generation - total demand = 0;
ceq = P_pv(k)+P_wind(k)+P_battery(k)+P_dg(k)*U_dg(k)-(P_load(k)+P_dump(k));

Réponses (1)

Alan Weiss
Alan Weiss le 15 Juil 2022

0 votes

Usually the way to include this type of equality constraint is to use the approach shown in Integer and Logical Modeling. For an example, see Optimal Dispatch of Power Generators: Problem-Based or the equivalent Optimal Dispatch of Power Generators: Solver-Based.
Alan Weiss
MATLAB mathematical toolbox documentation

3 commentaires

kam Pal
kam Pal le 15 Juil 2022
Hi Alan,
Thank you for your response. I went through the approach used in the given links. They have not used any equality constraints in the examples. For example, in Optimal Dispatch of Power Generators: Solver-Based, they use the below format, which means Aeq and beq are not considered.
[x,fval,eflag,output] = intlinprog(-f,1:length(f),A,b,[],[],lb,ub,options);
Furthermore, the above problem does not consider the power balance. My speciifc requirement is to establish the power balance equation (equality constraint). My implementation violates the equality constraint and the requirement is to solve this issue.
Alan Weiss
Alan Weiss le 15 Juil 2022
I was suggesting that you reformulate your problem to not have a nonlinear constraint like that. Make an indicator variable for when you have a dump load, and write an equation using that indicator variable for the dump load. That way, you will not rely on the solver to attempt to satisfy an equality constraint, which in general is very hard for a solver to accomplish.
Alan Weiss
MATLAB mathematical toolbox documentation
kam Pal
kam Pal le 16 Juil 2022
Thank you Alan. I will try it and see.

Connectez-vous pour commenter.

Catégories

Produits

Version

R2020a

Question posée :

le 15 Juil 2022

Commenté :

le 16 Juil 2022

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by