Which units are required in oemof input data (example pv)?

hello every one,

in the component source on oemof for example for pv, the fix should be defined as a fixed of normalised output of the pv plant. This the way how I did it but I’am not sure wether I did properly.

  1. I used the website https://www.renewables.ninja to generate pv plant output. bevor getting the result as hourly data I had to define the following parameters:
  • Dataset: MERRA-2
  • year of data: 2019
  • Capacity: 1 kW
  • System loss: 0.1
  • Tracking: none
  • Tilt: 6°
  • Azimuth: 180°
  1. In order to normalise the data I was thinking I just have to divide the output data by he max output generation of the pv plan, in my case is that 0,740 kW. This may be a stupid question but is that the correct way to do it ? or should I normalised the data by the Capacity I choose above in the parameters which is 1 kW.

I’am thinking about this situation for example for this ideal pv location:
If I would normalise the hourly output pv plant by the chosen Capacity (1 kW) and I’ve got for some timesteps data generation wich are > 1 kW for example 1,5 kW due to good meteorological weather condition inn the location, the normalised data would be > 1, wich is problematic for oemof. In contrast to that dividing by the maximum generation would not cause this issue, all the data would be < 1. I’am bit confused what is the correct way :confused:

I hope you got the problem.
I’d be grateful for any help.

In case of a fully defined component the fix-time-series will be multiplied with the nominal value, in case of an invest component with the invest variable.

You are free to define your own reference system but you have to use it consistently. You can use a time series from Ninja and set the nominal_value to one, or you can divide the time series by the peak capacity and use the peak capacity as nominal_value. You can do the same with the invest variable but you have to define the invest cost a accordingly. In most cases it makes sense to use standardised unit in order to not getting confused.

solph documentation

I think in solph 0.4.4 a fixed value >1 should work. Otherwise you should provide a minimal example, which shows that it does not work and we should create a bug report.

thanks Uwe!

I got the point with nominal_value but I wanna to be sure concerning the invest variable because this what I’m actually aiming to do. to optimise my system based on investment costs. I’m trying to resume that through this 2 cases. please correct if I’am wrong.

  • Case 1:

For example, if I assume an annuity of 500 USD/kWp for pv and and I would use the time series from Ninja with Capacity 1 kW. All I have to do is to read because the normed data are basically the same. this a part of hourly ninja generated data.

Time electricity_kW electricity_kW/(kWp)=electricity_kW/1kW
01.01.19 01:00 0 0
01.01.19 02:00 0 0
01.01.19 03:00 0 0
01.01.19 04:00 0 0
01.01.19 05:00 0 0
01.01.19 06:00 0 0
01.01.19 07:00 0,026 0,026
01.01.19 08:00 0,189 0,189
01.01.19 09:00 0,379 0,379
01.01.19 10:00 0,526 0,526
01.01.19 11:00 0,619 0,619
01.01.19 12:00 0,658 0,658
01.01.19 13:00 0,653 0,653
01.01.19 14:00 0,591 0,591
01.01.19 15:00 0,48 0,48
01.01.19 16:00 0,32 0,32
01.01.19 17:00 0,129 0,129
01.01.19 18:00 0,002 0,002
01.01.19 19:00 0 0

And as ep_costs I have just to put the assumed 500 USD/kWp as shown in the code :

pv = solph.Source(label='pv', outputs={bel_dc: solph.Flow(
                          investment= solph.Investment( ep_costs= 300, 
                                                       nonconvex = False, 
                                                       existing = 0),
  • Case 2:
    if I use the the peak capacity which is the max generation in the data= 0.74 kW to normalise the output of the pv plant
Time electricity_kW electricity_kW/(kWp)=electricity_kW/ 0.74 kW
01.01.19 01:00 0 0
01.01.19 02:00 0 0
01.01.19 03:00 0 0
01.01.19 04:00 0 0
01.01.19 05:00 0 0
01.01.19 06:00 0 0
01.01.19 07:00 0,026 0,035135135
01.01.19 08:00 0,189 0,255405405
01.01.19 09:00 0,379 0,512162162
01.01.19 10:00 0,526 0,710810811
01.01.19 11:00 0,619 0,836486486
01.01.19 12:00 0,658 0,889189189
01.01.19 13:00 0,653 0,882432432
01.01.19 14:00 0,591 0,798648649
01.01.19 15:00 0,48 0,648648649
01.01.19 16:00 0,32 0,432432432
01.01.19 17:00 0,129 0,174324324
01.01.19 18:00 0,002 0,002702703
01.01.19 19:00 0 0

now the question concerning the ep_costs, should be normed divided by the 0.74 kW as well ?

pv = solph.Source(label='pv', outputs={bel_dc: solph.Flow(
                          fix=feedin["electricity_kW/ 0.74kW"],
                          investment= solph.Investment( ep_costs= 300/0.74, 
                                                       nonconvex = False, 
                                                       existing = 0),

or what do you mean with standardised unit ?
I really appreciate your help to explain further your point!

thank you again!

to be honest I’ve not encountered this but I’ve seen that in a Oemof example which likely based on old oemof version. I will let you if I experienced this,

In case you have a feed-in with kW you could create a specific time series with kW/kWp or with kW/kW_max or kW/kW_something.

For the ep_costs you have to define accordingly EUR/kWp or EUR/kW_max etc.

As a result for the invest variable you will get the installed capacity in kWp or kW_max or kW_something.

All variants will work but fancy units may confuse people so I would use common/standardised units.

In an older version of solph the maximum was set to one by default, but we fixed it. If you think that values greater than one are cut of by the solver, this might be a bug and should be reported. In that case you should create a minimal example that shows the bug.

1 Like

Thanks Uwe! I’m really grateful because these are the basics and they should be done properly for the whole the energysystem!
my last question about this topic:
I see another Oemof example where the ep_costs for pv defined as pv_cost_annuity/peak_pv_generation → it means with EURO: EURO/kWp/kWp
is there some cases where we take that into consideration?

The point above with ep_costs EUR/kWp or EUR/kW_max (depending on feed-in) makes definitely more sense for me but I’ve not got the idea in this example where annuity divided by the peak_pv_generation :thinking:

The nominal_value is multiplied with the relative fix value to get the absolute value. In case of the investment the investment variable replaces the nominal_value. You can just write down the units and check if it works. I assume that the unit for the power is kW.

invest_variable * fix = flow

kWp * kW/kWp = kW (good)

kWp * kW/kWmax = kW*(kW_p/kW_max) → not consistent with the othe flows

You can do the same for the objective function. I assume that the objective function has the unit EUR.

invest_variable * ep_costs = total costs

kWp * EUR/kWp = EUR
kWp * EUR/kWmax = EUR*(kWp/kW_max) → not consistent to the other elements of the objective function

So you have to make sure that your input data has the right unit to build up a consistent energy system!

1 Like

that’s makes definitely sense! well explained !!
it’s really helpful! thank you so much!

Text and images licensed under CC BY 4.0Data licensed under CC0 1.0Code licensed under MITSite terms of serviceOpenmod mailing listOpenmod wiki.