Including power losses for Unit Commitment

10 Ansichten (letzte 30 Tage)
Micah Mungal
Micah Mungal am 15 Jun. 2018
I have been able to formulate the problem for the Unit Commitment problem using the optimproblem approach with the help from a similar example on the MATLAB page. So far I have ensured that the total power generated meets the load demand and that power generated by any unit is within limits. I have also included the minimum up and down time constraint. I now have to include the power loss with the equality constraint. That is the total power generated must meet the load demand plus losses.
The method I use to find this power loss uses a B coefficient matrix, which determines the power loss as follows:
P_loss = [P_1 P_2] * [B_11 B_12; * [P_1;
B_21 B_22] P_2]
That is for a system with two generating units, the power loss is given as P * B * P'.
Now for my particular case, I have linearized the cost function for each generator and therefore,
P_1 = P_1min + P_11 + P_12 + + P_1N
Where N is the number of segments used to linearized the curve. But the same concept applies with respect to the calculation: P * B * P' except that B is now larger and follows a different configuration of the values. Now P in my code is a optimization variable 'power'. Without actually coding anything, I attempted to determine P * B * P' from the command line and ran into an error. Firstly I did B * P', and since P' is the transpose of the 'power' variable, it returned an optimization variable. Next when I tried to premultiply P to this optimization variable, I got an error telling me that one of the variables need to be numeric. A quick search of this error revealed that I cannot have any quadratic terms apparently as is indicated would happen here:
P_loss = [P_1 P_2]*[B_11 B_12; * [P_1;
B_21 B_22] P_2]
= [P_1 P_2]*[B_11*P_1 + B_12*P_2;
B_21*P_1 + B_22*P_2]
= P_1(B_11*P_1 + B_12*P_2) + P_2(B_21*P_1 + B_22*P_2)
My initial approach involves creating some optimization expression in terms of P and B which correspond to the power loss and just including it in the load demand constraint. That is based on my code:
powerprob.Constraints.isDemandMet = sum(power,2) >= Load - sum((minPowConst.*isOn),2) + P_loss;
(sum((minPowConst.*isOn),2)) can be ignored for now. This is the subtraction of the P_min values due to linearization.
I have attached my working code which includes everything except the inclusion of any power losses. I would greatly appreciate some guidance in this matter.
  2 Kommentare
Khaldon Qaid
Khaldon Qaid am 30 Apr. 2020
Bearbeitet: Khaldon Qaid am 30 Apr. 2020
Hi
I try to run the code but its not working, its give this error.
[Error using optim.internal.problemdef.ProblemImpl/solveImpl
The value of 'x0' is invalid. Initial point must be a nonempty struct.
Error in optim.problemdef.OptimizationProblem/solve
Error in UC (line 308)
[sol,TotalCost,exitflag,output] = solve(powerprob,options);]
Can you please share the corrct code?
Thank you
Lars Abrahamsson
Lars Abrahamsson am 9 Mai 2020
Could this be related to different versions of Matlab?

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Linear Programming and Mixed-Integer Linear Programming finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by