|
200 | 200 | %price_electricity(residual_fossil_production==0) = 0; % set price to 0 for moments of excess electricity
|
201 | 201 |
|
202 | 202 | % v5 price based on gas and CO2 price
|
203 |
| -gas = [40; 80]; % €/MWh thermal for low and high scenario |
204 |
| -plant_eff = 0.55; % [-] thermal to elec eff |
| 203 | +gas = [22; 28]; % €/MWh thermal for 2022 and 2030 scenario |
| 204 | +plant_eff = 0.56; % [-] thermal to elec eff |
205 | 205 | gasplant_fuel_cost = gas./plant_eff;
|
206 |
| -CO2_price = [80; 150]; % €/tCO2 emitted in 2022 and in 2030 |
| 206 | +CO2_price = [85; 150]; % €/tCO2 emitted in 2022 and in 2030 |
207 | 207 | CO2_emit_gas_plant = 549; % gCO2/kWh = kgCO2/MWh thermal gas
|
208 | 208 | CO2_marginal_cost = CO2_price .* CO2_emit_gas_plant./1000; % €/MWh additional due to CO2 costs
|
209 | 209 | gasplant_marginal_cost = gasplant_fuel_cost + CO2_marginal_cost % €/MWh electricity delivered marginal costs
|
210 | 210 |
|
211 |
| -fossil_min_price = 59.8; % €/MWh |
212 |
| -gasplant_nom_cost_at_residual_load = 20; % GW |
| 211 | +fossil_min_price = 44; % €/MWh |
| 212 | +gasplant_nom_cost_at_residual_load = 15; % GW |
213 | 213 | bid_incl_exponential = log(gasplant_marginal_cost/fossil_min_price)/(gasplant_nom_cost_at_residual_load*1000);
|
214 | 214 | % exponential price options:
|
215 | 215 | price_electricity(:,1) = fossil_min_price.*exp(residual_load_curves(:,1).*bid_incl_exponential(1)); % [€/MWh] and if residual < 0 than €0/MWh if 0 fossil production or negative residual = excess reneawble energly production
|
|
428 | 428 | %% Daily price statistisc, 24h grouped histogram, and make difference for winter vs summer, hypothesis: summer daily low prices during day, winter: daily low prices during low load hours at night 00:00-05:00
|
429 | 429 |
|
430 | 430 | % Jaar 2022:
|
431 |
| -price_electricity_reshaped_2022 = reshape(price_electricity(:,1), [], 24); |
432 |
| -price_electricity_dayhouravg_2022 = sum(price_electricity_reshaped_2022)./365; |
| 431 | +price_electricity_reshaped_2022 = reshape(price_electricity(:,1), 24, 365); |
| 432 | +price_electricity_dayhouravg_2022 = sum(price_electricity_reshaped_2022')./365; |
433 | 433 | % Jaar 2030:
|
434 |
| -price_electricity_reshaped_2030 = reshape(price_electricity(:,2), [], 24); |
435 |
| -price_electricity_dayhouravg_2030 = sum(price_electricity_reshaped_2030)./365; |
| 434 | +price_electricity_reshaped_2030 = reshape(price_electricity(:,2), 24, 365); |
| 435 | +price_electricity_dayhouravg_2030 = sum(price_electricity_reshaped_2030')./365; |
436 | 436 |
|
437 | 437 |
|
438 | 438 | if 1 == 1
|
|
459 | 459 | %hold on
|
460 | 460 |
|
461 | 461 | % Jaar 2030:
|
462 |
| -price_electricity_reshaped_2030_sunny = reshape(price_electricity(time_sunny_pv_start:time_sunny_pv_end-1,2), [], 24); |
463 |
| -price_electricity_dayhouravg_2030_sunny = sum(price_electricity_reshaped_2030_sunny)./time_sunny_diff_sunny; |
| 462 | +price_electricity_reshaped_2030_sunny = reshape(price_electricity(time_sunny_pv_start:time_sunny_pv_end-1,2), 24, []); |
| 463 | +price_electricity_dayhouravg_2030_sunny = sum(price_electricity_reshaped_2030_sunny')./time_sunny_diff_sunny; |
464 | 464 |
|
465 | 465 | stairs(price_electricity_dayhouravg_2030_sunny,'LineWidth',2)
|
466 | 466 |
|
|
472 | 472 | price_electricity_windy_B = price_electricity(time_sunny_pv_end:end,2);
|
473 | 473 | price_electricity_windy = [price_electricity_windy_A; price_electricity_windy_B];
|
474 | 474 |
|
475 |
| -price_electricity_reshaped_2030_windy = reshape(price_electricity_windy, [], 24); |
476 |
| -price_electricity_dayhouravg_2030_windy = sum(price_electricity_reshaped_2030_windy)./time_sunny_diff_windy; |
| 475 | +price_electricity_reshaped_2030_windy = reshape(price_electricity_windy, 24, []); |
| 476 | +price_electricity_dayhouravg_2030_windy = sum(price_electricity_reshaped_2030_windy')./time_sunny_diff_windy; |
477 | 477 | stairs(price_electricity_dayhouravg_2030_windy,'LineWidth',2)
|
478 | 478 |
|
479 | 479 |
|
480 |
| -legend('2022','2030','2030 march to 1 oct','winter months') |
| 480 | +legend('regular 2019 year','2030 whole year','2030 sunny months: 1 march to 1 oct','2030 darker winter months') |
481 | 481 |
|
482 | 482 |
|
483 |
| - save_fig(h,'Lipton_v4_5_1_Dec'); |
| 483 | + save_fig(h,'2030 daily hourly avg electricity price_v2'); |
484 | 484 | end
|
485 | 485 | % TODO: check if 24 hours are aligned and are not mismatched one hour per day. well issue would be not too big, since it will only shift the histogram an hour, not more than that.
|
486 | 486 |
|
|
896 | 896 | rx1 = nexttile;
|
897 | 897 |
|
898 | 898 | %start_point = 3100 = 11 May
|
899 |
| - strtPt = 3200; % |
900 |
| - days = 14; |
| 899 | + strtPt = 3200; %3200 |
| 900 | + days = 10; |
901 | 901 | endPt = strtPt+days*24;
|
902 | 902 |
|
903 | 903 | % V2G discharge
|
|
1073 | 1073 |
|
1074 | 1074 | %% Save figure as png
|
1075 | 1075 |
|
1076 |
| - save_fig(h0,'Lipton_v4_5_1_Dec'); |
| 1076 | + save_fig(h0,'Lipton_v4_5_Feb2023'); |
1077 | 1077 |
|
1078 | 1078 | % print -dpng -r300 Lipton_v4_5_28_Juli
|
1079 | 1079 |
|
|
1092 | 1092 |
|
1093 | 1093 |
|
1094 | 1094 |
|
| 1095 | +%% Save prices to xlsx |
| 1096 | +h8 = figure(); |
| 1097 | +stairs(time_array(:,2),price_electricity(:,2)) |
| 1098 | +hold on |
| 1099 | +stairs(time_array(:,2),price_electricity(:,1)) |
| 1100 | +grid |
| 1101 | +legend('2030 Matlab','2022 reverse modelled') |
| 1102 | +ylabel('Hourly Day-Ahead market Electricity price €/MWh') |
| 1103 | +title(sprintf('Year: %.0f, Consumption: %.1f TWh, %.1f GW Wind, %.1f GWp PV, Wind gen: %.0f prct, PV gen: %.0f prct', jaren(jaar),Cons_annual(jaar)/1000, P_wind_installed_array(jaar)/1000 ,P_zon_installed_array(jaar)/1000, Prod_wind_perc(jaar)*100, Prod_solar_perc(jaar)*100) ) |
| 1104 | + |
| 1105 | +%% |
| 1106 | +save_fig(h8,'Matlab-Day-Ahead-prices-2022-2030'); |
| 1107 | + |
1095 | 1108 |
|
| 1109 | +%% |
| 1110 | +price_electricity_table = table; |
| 1111 | + |
| 1112 | +price_electricity_table.time = time_array(:,2); |
| 1113 | +price_electricity_table.price_2022 = price_electricity(:,1); |
| 1114 | +price_electricity_table.price_2030 = price_electricity(:,2); |
| 1115 | + |
| 1116 | + |
| 1117 | +%% |
1096 | 1118 |
|
| 1119 | +writetable(price_electricity_table,'Matlab-Day-Ahead-prices-2022-2030_table.xlsx') |
| 1120 | +writetable(price_electricity_table,'Matlab-Day-Ahead-prices-2022-2030_table.csv') |
1097 | 1121 |
|
| 1122 | +%xlswrite('Matlab-Day-Ahead-prices-2022-2030_table.xlsx',price_electricity_table) |
1098 | 1123 |
|
| 1124 | +% writematrix(price_electricity,'M_tab.csv') |
| 1125 | +% csvwrite('price_electricity_upto1200.csv',price_electricity) |
0 commit comments