sir
according to the time of use program under demand response concept,the
demand during some peak periods is high.so i want to make the price to be
higher under such periods and low during offpeak periods.is it possible
using matpower.

On Tue, Feb 23, 2016 at 8:52 PM, Ray Zimmerman <[email protected]> wrote:

> The price is not something you “set” when running an OPF. It is one of the
> outputs. If you have a range of generator costs, you should see prices rise
> as load increases. Of course, you can also vary the costs at different
> hours too. But you will need to decide precisely how you want to specify
> the problem to solve at each hour. Is it just the load that is changing?
>
> If so, and you have the load scaling factors stored in a vector factor,
> then you can do it something like this …
>
> define_constants;
> factor = [0.5; 0.8; 1.0];
> mpc0 = loadcase('case14o');
> nt = length(factor);
> nb = size(mpc0.bus, 1);
> load_zone = zeros(nb, 1);
> load_zone(3) = 1;
> for t = 1:nt
>     mpc(t) = mpc0;
>     [mpc(t).bus, mpc(t).gen] = ...
>         scale_load(factor(t), mpc(t).bus, mpc(t).gen, load_zone);
>     results(t) = runpf(mpc(t));
> end
>
> Then you can find the resulting prices for period *t* in results(t).bus(:,
> LAM_P).
>
>    Ray’
>
>
>
> On Feb 20, 2016, at 4:17 AM, shruti seemala <[email protected]>
> wrote:
>
> >>sir
>
> i am getting the load variations by writing the code as below.but i want
> that variations for 8hrs,4hrs,10hrs respectively and i want to set the
> price at that bus high during peak periods and low during off peak
> periods.i read the price sensitive loads but i am not understanding how to
> apply.sir if you dont mind please explain me with the code by taking a
> small 5 bus system.it is very necessary for my project work.
>
>
>  mpc1 = loadcase('case14o');
>
> >> define_constants;
>
> >> for factor = 0.5
>
> mpc1.bus(3,PD) = factor*41.0;
>
> mpc1.bus(3,QD) = factor*41.0;
>
> results = runpf(mpc1);
>
> mpc2 = loadcase('case14o');
>
> define_constants;
>
> for factor = 0.8
>
> mpc2.bus(3,PD) = factor*41.0;
>
> mpc2.bus(3,QD) = factor*41.0;
>
> results = runpf(mpc2);
>
> mpc3 = loadcase('case14o');
>
> define_constants;
>
> for factor = 1.0
>
> mpc3.bus(3,PD) = factor*41.0;
>
> mpc3.bus(3,QD) = factor*41.0;
>
> results = runpf(mpc3);
>
> end
>
> end
>
> end
>
> is the above code is correct or not please check.
>
> On Sat, Feb 20, 2016 at 1:31 AM, Ray Zimmerman <[email protected]> wrote:
>
>> Please read the scale_load()
>> <http://www.pserc.cornell.edu//matpower/docs/ref/matpower5.1/scale_load.html>
>>  documentation
>> carefully. To scale the load at a single bus (e.g. bus 3) you need to set
>> the load_zone argument to select that bus …
>>
>> nb = size(mpc(t).bus, 1);
>> load_zone = zeros(nb, 1);
>> load_zone(3) = 1;
>> [mpc(t).bus, mpc(t).gen] = scale_load(0.5, mpc(t).bus, mpc(t).gen,
>> load_zone);
>>
>>    Ray
>>
>>
>>
>>
>> On Feb 19, 2016, at 7:59 AM, shruti seemala <[email protected]>
>> wrote:
>>
>> sir
>> i am doing my project on demand response using time based program.
>> 1.i am taking an ieee 14 bus system.
>> 2.i apply demand response on one of the buses which have more demand.
>> 3.for that i require peak,off peak and valley period demand and price
>> under different periods.
>> 4.for 8hrs,4hrs and 10hrs the load variation is 0.5*peak
>> load,1*peakload,0.8*peakload respectively i assumed.
>> 5.i want to select 3rd bus and assume peakload as 41MW.
>> 6.i use this code for first 8hrs.
>> mpc0 = loadcase('case14');
>> for t = 1:8
>> mpc(t) = mpc0;
>> mpc(t).bus = scale_load(0.5, mpc(t).bus);
>> results(t) = runpf(mpc(t));
>> end
>> i get some result.but i want the load to  be change at third bus only as
>> mentioned w.r.t peakload
>> 7.for that i try this code
>>  mpc0 = loadcase('case14');
>> >> for t = 1:8
>> mpc(t) = mpc0;
>> mpc(t).bus = scale_load(0.5, mpc(t).bus(4,4));
>> results(t) = runpf(mpc(t));
>> end
>> Attempted to access bus(:,3); index out of bounds because numel(bus)=1.
>>
>> Error in scale_load (line 168)
>>         load_zone(bus(:, PD) ~= 0 | bus(:, QD) ~= 0) = 1;   %% FIXED loads
>>  it is showing like this.
>> i use mpc(t).bus(4,4) because it is the representation of 3rd bus load in
>> the bus data.is it correct approach.
>> 8.how can we set price for different periods.
>> 9.please suggest me
>>
>>
>>
>
>

Reply via email to