Question: Need matlab code: Problem 2 : Storage control We consider the use of a storage device ( say , a battery ) to reduce the

Need matlab code: Problem 2: Storage control
We consider the use of a storage device (say, a battery) to reduce the total cost of electricity
consumed over one day. We divide the day into T time periods, and let (t) denote the
(positive, time-varying) electricity price ?1, and l(t) denote the (nonnegative) load, in period
t, for t=1,dots,T. Without the use of a battery, the total cost is TTl.
Let x(t) denote the (nonnegative) energy stored in the battery in period t. For simplicity,
we neglect energy loss (although this is easily handled as well), so we have x(t+1)=
x(t)+u(t),t=1,dots,T, where u(t) is the charging of the battery in period t if u(t)0;
u(t)0 means the battery is discharged. With the battery operating, the net consumption
in period t is l(t)+u(t); we require this to be nonnegative (i.e., in this case, the utility does
not allow selling back to the grid). The total cost is then TT(l+u).
The battery is characterized by three parameters: The capacity x, where 0x(t)x;
the maximum charge rate ?bar(uc), where u(t)?bar(u)c; and the maximum discharge rate ?bar(u)d, where
u(t)-bar(u)d.(The parameters x,bar(u)c, and ?bar(u)d are nomegative.)
The initial storage level is 0. Since we are not dealing with generator dispatch directly,
it's convenient to work with energy (in kWh) instead of power (in kW). Hence all units in
this problem is kWh, including the units of load and storage control u(t). The unit of price
is $kWh.
(a) Formulate an optimization to find the charging profile uinRT(and associated stored
energy profile xinRT+1) that minimizes the total cost, subject to the constraints.
(b) Solve the problem instance with data and l given in storage_data.m,x=35, and
?bar(u)?b=ar(u)d=3. Plot l(t),(t),u(t), and x(t) versus t.
(c) Plot the minimum total cost versus the storage capacity x, using and l from storage_data.m,
and charge/discharge limits ?bar(u)c?b=ar(u)d=3. Repeat for charge/discharge limits ?bar(u)c?b=ar(u)d=
(Put these two trade-off curves on the same plot.) Give an interpretation of the
endpoints of the trade-off curves.
 Need matlab code: Problem 2: Storage control We consider the use

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!