quintel / merit

A system for calculating hourly electricity and heat loads with a merit order
MIT License
4 stars 2 forks source link

Small electricity import figures when merit order is on for some countries #120

Closed ChaelKruip closed 10 years ago

ChaelKruip commented 10 years ago

When the Merit Order is 'on' the import / export balance for electricity should be zero except when:

ChaelKruip commented 10 years ago

Because the numbers are quite small, I don't think this is a show-stopper for the September deploy.

ChaelKruip commented 10 years ago

Including @dennisschoenmakers @antw @AlexanderWirtz

AlexanderWirtz commented 10 years ago

Interesting. Worth looking at, but no showstopper

ChaelKruip commented 10 years ago

I have used the scenario-dumping functionality that @antw developed for the Berenschot project to get demand curve and load curves for a default DE scenario for 2050. This scenario shows 5.0PJ export in the front-end.

The following plot can be made from the dumped data: figure_1 We show here the residual demand (demand - volatile_production - must-run_production), and the available installed capacity of dispatchables. We also show the volatile_production + must-run_production for fun.

We would have export if the residual load curve would be negative anywhere and we would have import if the residual load curve would be higher than the available installed capacity.

Funny enough, we see neither in this plot. Not conclusive so far...

antw commented 10 years ago

@ChaelKruip I'm still working on this... so far I've been looking at one of the cases where we have unexpected import (since that's easier to trace in the merit order); more specifically, FR/2050.

Installed capacity is too low for some hours (import)

This appears to be the case for the hours I've tested so far. For France, this occurs intermittently at the beginning and end of the year (between points 0-1256 and 7999-8322), but not at all in the middle of the year.

Here's the load for a single hour (416):

+---+------------------------------------------------------+---------+----------+--------+
|   | Key                                                  | % Used  | MWh Load | M.Cost |
+---+------------------------------------------------------+---------+----------+--------+
| U | total_demand                                         |       - | 90951.89 |      - |
+---+------------------------------------------------------+---------+----------+--------+
| A | energy_chp_supercritical_waste_mix                   | 100.0 % |   215.53 |   0.00 |
| A | buildings_solar_pv_solar_radiation                   | 100.0 % |    61.72 |   0.00 |
| A | energy_power_wind_turbine_inland                     | 100.0 % |    55.95 |   0.00 |
| A | energy_power_solar_pv_solar_radiation                | 100.0 % |    36.31 |   0.00 |
| A | energy_power_supercritical_waste_mix                 | 100.0 % |   292.92 |   1.17 |
| A | industry_chp_ultra_supercritical_coal                | 100.0 % |   270.45 |  24.61 |
| A | buildings_collective_chp_network_gas                 | 100.0 % |   108.21 |  64.45 |
| A | agriculture_chp_engine_network_gas                   | 100.0 % |     0.44 |  64.45 |
| A | industry_chp_combined_cycle_gas_power_fuelmix        | 100.0 % |   239.08 |  77.29 |
| A | industry_chp_turbine_gas_power_fuelmix               | 100.0 % |   438.21 |  85.85 |
| A | buildings_collective_chp_wood_pellets                | 100.0 % |    88.53 | 147.45 |
| A | buildings_chp_engine_biogas                          | 100.0 % |    70.75 | 151.87 |
| A | agriculture_chp_engine_biogas                        | 100.0 % |     2.23 | 151.87 |
| A | households_solar_pv_solar_radiation                  |     - % |     0.00 |   0.00 |
| A | energy_power_wind_turbine_coastal                    |     - % |     0.00 |   0.00 |
| A | energy_power_hydro_river                             |     - % |     0.00 |   0.00 |
| A | energy_power_wind_turbine_offshore                   |     - % |     0.00 |   0.00 |
| A | energy_power_solar_csp_solar_radiation               |     - % |     0.00 |   1.00 |
| A | households_collective_chp_network_gas                |     - % |     0.00 |  64.45 |
| A | industry_chp_engine_gas_power_fuelmix                |     - % |     0.00 |  82.73 |
| A | agriculture_chp_supercritical_wood_pellets           |     - % |     0.00 | 147.31 |
| A | households_collective_chp_wood_pellets               |     - % |     0.00 | 147.45 |
| A | households_collective_chp_biogas                     |     - % |     0.00 | 151.87 |
| A | households_water_heater_fuel_cell_chp_network_gas    |     - % |     0.00 |    NaN |
| A | households_space_heater_micro_chp_network_gas        |     - % |     0.00 |    NaN |
| A | households_water_heater_micro_chp_network_gas        |     - % |     0.00 |    NaN |
+---+------------------------------------------------------+---------+----------+--------+
| T | energy_power_hydro_mountain                          | 100.0 % |  5435.66 |   2.49 |
| T | energy_power_nuclear_gen2_uranium_oxide              | 100.0 % | 54911.46 |   5.04 |
| T | energy_power_combined_cycle_coal                     | 100.0 % |   354.67 |  17.30 |
| T | energy_power_ultra_supercritical_coal                | 100.0 % |   302.85 |  17.78 |
| T | energy_power_supercritical_coal                      | 100.0 % |  5295.71 |  22.49 |
| T | energy_power_combined_cycle_network_gas              | 100.0 % |  1385.75 |  42.36 |
| T | energy_power_ultra_supercritical_cofiring_coal       | 100.0 % |    22.88 |  44.36 |
| T | energy_chp_combined_cycle_network_gas                | 100.0 % |  1990.40 |  59.83 |
| T | energy_power_ultra_supercritical_network_gas         | 100.0 % |  1347.26 |  63.10 |
| T | energy_power_turbine_network_gas                     | 100.0 % |  1283.10 |  74.69 |
| T | energy_power_ultra_supercritical_crude_oil           | 100.0 % |  5742.84 | 114.98 |
| T | energy_power_engine_diesel                           | 100.0 % |   840.00 | 187.87 |
| T | energy_power_nuclear_gen3_uranium_oxide              |     - % |     0.00 |   4.84 |
| T | energy_power_ultra_supercritical_lignite             |     - % |     0.00 |  13.67 |
| T | energy_chp_ultra_supercritical_lignite               |     - % |     0.00 |  14.44 |
| T | energy_power_ultra_supercritical_oxyfuel_ccs_lignite |     - % |     0.00 |  19.34 |
| T | energy_chp_ultra_supercritical_coal                  |     - % |     0.00 |  20.66 |
| T | energy_power_combined_cycle_ccs_coal                 |     - % |     0.00 |  21.42 |
| T | energy_power_ultra_supercritical_ccs_coal            |     - % |     0.00 |  27.68 |
| T | energy_chp_ultra_supercritical_cofiring_coal         |     - % |     0.00 |  50.61 |
| T | energy_power_engine_network_gas                      |     - % |     0.00 |  52.94 |
| T | energy_power_combined_cycle_ccs_network_gas          |     - % |     0.00 |  55.01 |
+---+------------------------------------------------------+---------+----------+--------+

Here's a listing of each hour in the year where this occurs:

11/Jan - 258
12/Jan - 271 272 273 274 275 281 282 283
13/Jan - 295 296 297 306
16/Jan - 366 367 368 369 370 371 372 377 378 379 380 382
17/Jan - 390 391 392 393 394 395 396 397 398 400 401 402 403 404 406
18/Jan - 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428
19/Jan - 439 440 441 442 443 444 449 450 451
30/Jan - 703 704 705 706 707 708 709 710 713 714 715
31/Jan - 728 729 730 731 732 733 734 736 737 738 739 740 742
01/Feb - 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767
02/Feb - 769 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791
03/Feb - 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815
04/Feb - 816 817 818 822 823 824 825 826 827 828 829 830 832 833 834 835 836 837 838 839
05/Feb - 840 841 842 849 850 851 852 858 859 860 862
06/Feb - 870 871 872 873 874 875 876 877 878 881 882 883 884 885 886 887
07/Feb - 889 890 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911
08/Feb - 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935
09/Feb - 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959
10/Feb - 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983
11/Feb - 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007
12/Feb - 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1025 1026 1027 1028 1029 1030 1031
13/Feb - 1032 1033 1034 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055
14/Feb - 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1073 1074 1075
15/Feb - 1087 1088 1089 1090 1091 1092 1093 1098 1099
16/Feb - 1122
21/Feb - 1232 1233
22/Feb - 1256
30/Nov - 7999 8000 8001 8010
03/Dec - 8082
04/Dec - 8106
05/Dec - 8130
06/Dec - 8143 8144 8145 8146 8147 8153 8154 8155
07/Dec - 8167 8168 8169 8170 8171 8172 8173 8174 8177 8178 8179
10/Dec - 8250
11/Dec - 8263 8264 8265 8266 8267 8273 8274 8275
12/Dec - 8286 8287 8288 8289 8290 8291 8292 8293 8296 8297 8298 8299 8300 8302
13/Dec - 8310 8311 8312 8313 8314 8315 8316 8322
ChaelKruip commented 10 years ago

Here's a listing of each hour in the year where this occurs:

Looks as expected: demand is highest in wintertimes.

ChaelKruip commented 10 years ago

The reason for the small export figures is the fact that we made the energy_power_sector_own_use_electricity dependent on the flow through the HV network. This makes sense from a physical point of view: if the energy sector as a whole is scaled up, its own use scales up accordingly. This behavior is similar to that of the loss converter which also has a demand that depends on the total flow through the HV network.

For the loss converter (energy_power_hv_network_loss) we corrected for the expected change when using Merit by computing the demand of the HV net with the assumption that there is not export of electricity in the system and the corresponding loss.

The numbers confirm this. For DE the demand of the energy_power_sector_own_use_electricity is

2011:  133.48
20XX:  128.53
      --------- -
delta:   4.95

The difference is indeed the ~5.0 PJ that is exported.

We could fix this by applying a similar correction for energy_power_sector_own_use_electricity but perhaps we should also take a step back and re-evaluate this intransparent and somewhat arbitrary behavior of the model.

AlexanderWirtz commented 10 years ago

you da man! good catch @ChaelKruip

ChaelKruip commented 10 years ago

The fix that I propose and have implemented in https://github.com/quintel/etengine/pull/715 is to correct for disbalance between demand and production in such a way that there is no export or import. The total demand that is sent to Merit should thus result in a situation where production matches perfectly with local demand (including loss and own use).

To compute the total demand in as if there was no import or export we can use the following balance:

loss + own_use + export + mv_hv == hv + import

Now we assume that both import and export are equal to zero.

loss + own_use + mv_hv == hv',

where hv' denotes the demand of the HV network if import and export are zero. Because loss and own_use are both dependent on hv through a constant we can write:

hv' * c_loss + hv' * c_own_use + mv_hv == hv',

which can be rewritten as:

hv' == mv_hv / (1 - c_loss - c_own_use).

So, now we have found the demand of the HV network if import and export are zero as a function of constants.

Unfortunately, this number is not exactly balancing supply and demand. Depending on the country, devaitions of 0.1 - 0.5 PJ are still seen. This provides some background for https://github.com/quintel/etengine/issues/716

ChaelKruip commented 10 years ago

Closing this as the issue unique to this ticket has been solved by giving 'own use' a constant demand.