-
Notifications
You must be signed in to change notification settings - Fork 0
/
main_AWE_HPS.asv
243 lines (146 loc) · 11 KB
/
main_AWE_HPS.asv
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
% main_AWE_HPS calculates the economic performance of a grid-connected HPS with ground-gen fixed-wing AWE power and power smoothing storage
% This function performs energy yield, storage performance, arbitrage revenue and storage degradation
% to compute the economic output of a fixed-wing airborne wind energy system
% over one year of operation at a certain DAM and wind environment.
% Author
% Bart Zweers,
% Delft University of Technology
% clc;
clearvars;
addpath(genpath([pwd '/inputFiles']));
addpath(genpath('C:\Users\bartz\Documents\GitHub\MSc_Bart_Zweers\src'));
addpath(genpath('C:\Users\bartz\Documents\GitHub\MSc_Bart_Zweers\inputFiles'));
addpath(genpath('C:\Users\bartz\Documents\GitHub\MSc_Bart_Zweers\lib'));
%% System inputs
% inputs = loadInputs('inputFile_100kW_AWEHPS.yml');
inputs.subsidy = 110; % Subsidized electricity price [EUR/MWh] 110 from german AWE
inputs.batt_size = 140; % kWh
inputs.batt_type = 1; % P/E or C rate
inputs.batt_price = 130; % [EUR/kWh] source: https://www.nrel.gov/docs/fy21osti/79236.pdf
inputs.batt_eff = 0.90; % Round trip efficiency [%]
inputs.N_li_cycles = 1e4; % [lifetime cycles]
inputs.N_li_years = 10; % [lifetime years]
inputs.UC_price = 6e4; % [EUR/Wh] source: https://www.nrel.gov/docs/fy21osti/79236.pdf
inputs.UC_eff = 1; % Round trip efficiency [%]
inputs.N_UC_cycles = 1e6; % [lifetime cycles]
inputs.N_UC_years = 16; % [lifetime years]
inputs.batt_min = 0.1; % SoC lower limit strage system [-]
inputs.batt_max = 0.9; % SoC upper limit strage system [-]
inputs.business.N_y = 25; % project years
inputs.business.r_d = 0.08; % cost of debt
inputs.business.r_e = 0.12; % cost of equity
inputs.business.TaxRate = 0.25; % Tax rate (25%)
inputs.business.DtoE = 70/30; % Debt-Equity-ratio
inputs.r = inputs.business.DtoE/(1+ inputs.business.DtoE)*inputs.business.r_d*(1-inputs.business.TaxRate) + 1/(1+inputs.business.DtoE)*inputs.business.r_e;
Scen1.ICC = 439e3; % Capital cost kite system without intermediate storage
Scen1.OMC = 12.2e3; % Operational cost kite system without intermediate storage
%% Scenario parameters
[inputs.DAM, inputs.vw, inputs.vol] = Param(readtable('DAM_NL_2019.csv'), ncread('NL_Wind.nc','u100'),ncread('NL_Wind.nc','v100'));
Scen3.w = 4;
Scen3.var = 0.17;
Scen4.w = 4;
Scen4.var = 0.17;
%% AWE performance
% AWE kite power hourly [kW]
[Scen1.P, Scen1.Cf, Scen1.AEP] = AWEperf(inputs.vw, [0 0 0 0 6823.05494180757 20750.8552913604 40035.5511607199 63415.6188669052 85700.7504181529 99999.9999634139 99999.9999993995 100000.000000000 99999.9999612856 99999.9999939655 99999.9999993012 99999.9999999965 100000.000000000 100000.000000000 100000.000000000 100000 100000.000000000]'...
, 4, 10);
% AWE power smoothing timeseries [kW]
[Scen1.P_sm, Scen1.E_sm, Scen1.E_res, Scen2.E_batt_req, Scen1.E_UC_req] = AWEsm(inputs.vw, Scen1.P, [0 0 0 0 39.2114406427936 93.0947366719285 207.022440717841 412.999777754543 702.156555319391 810.070535420744 805.462031428633 808.180879889064 809.929699115073 813.114155193377 816.935309245319 821.167178788006 825.732017996912 830.577439826927 835.618275680234 840.916791101337 847.169221886612]/1e3...
, [0 0 0 0 199.110877845002 87.6714004467267 85.5139407777646 87.3579932218051 93.3237218054094 80.8992375788376 79.9581035213846 79.4595074569484 79.1889899452987 79.0790839654564 79.0738117712405 79.1297853113387 79.2192139488680 79.3068747121754 79.3241622327488 79.2940943437130 79.9040793712790]...
, [0,137.381331953625,137.209204335937,0,-39.7295922699621,7.03564325810917e-14,0], [0 0 0 0 6823.05494180757 20750.8552913604 40035.5511607199 63415.6188669052 85700.7504181529 99999.9999634139 99999.9999993995 100000.000000000 99999.9999612856 99999.9999939655 99999.9999993012 99999.9999999965 100000.000000000 100000.000000000 100000.000000000 100000 100000.000000000]');
%% Scenario 1 AWE + UC
% AWE+UC energy and profit performance
[Scen1.R_arb, Scen1.R_kite, Scen1.f_repl, Scen1.CapEx, Scen1.OpEx] = Scenperf(Scen1.P, zeros(8760,1), inputs.DAM, inputs.subsidy, Scen1.E_sm,...
inputs.N_UC_years, inputs.N_UC_cycles, inputs.UC_price, Scen1.E_UC_req, Scen1.ICC, Scen1.OMC);
% AWE + UC economic metrics
[Scen1.LCoE, Scen1.LRoE, Scen1.LPoE, Scen1.Payb] = EcoMetrics(inputs.r,Scen1.R_kite,Scen1.AEP,Scen1.CapEx,Scen1.OpEx, inputs.business.N_y);
Scen1.NPV = NPV(inputs.r,Scen1.R_kite,Scen1.CapEx,Scen1.OpEx, inputs.business.N_y);
[Scen1.IRR,~] = fsolve(@(r) NPV(r,Scen1.R_kite,Scen1.CapEx,Scen1.OpEx, inputs.business.N_y),0,optimoptions('fsolve','Display','none'));
%% Scenario 2 AWE + Batt
% AWE + Batt energy and profit performance
[Scen2.R_arb, Scen2.R_kite, Scen2.f_repl, Scen2.CapEx, Scen2.OpEx] = Scenperf(Scen1.P, zeros(8760,1), inputs.DAM, inputs.subsidy, Scen1.E_sm, ...
inputs.N_li_years, inputs.N_li_cycles, inputs.batt_price, Scen2.E_batt_req, Scen1.ICC, Scen1.OMC);
% AWE + Batt economic metrics
[Scen2.LCoE, Scen2.LRoE, Scen2.LPoE, Scen2.Payb] = EcoMetrics(inputs.r,Scen2.R_kite,Scen1.AEP,Scen2.CapEx,Scen2.OpEx, inputs.business.N_y);
Scen2.NPV = NPV(inputs.r,Scen2.R_kite,Scen2.CapEx,Scen2.OpEx, inputs.business.N_y);
[Scen2.IRR,~] = fsolve(@(r) NPV(r,Scen2.R_kite,Scen2.CapEx,Scen2.OpEx, inputs.business.N_y),0,optimoptions('fsolve','Display','none'));
%% Scenario 3 Batt arbitrage
% Batt arbitrage bidding dispatch
[Scen3.SoC,Scen3.P] = Dispatcher(Scen3.w, Scen3.var, inputs.DAM, zeros(8760,1), zeros(8760,1), inputs.batt_min*Scen2.E_batt_req, inputs.batt_max*Scen2.E_batt_req,...
Scen2.E_batt_req, inputs.batt_type, inputs.batt_eff);
% Batt arbitrage energy and profit performance
[Scen3.R_arb, Scen3.R_kite, Scen3.f_repl, Scen3.CapEx, Scen3.OpEx] = Scenperf(zeros(8760,1), Scen3.P, inputs.DAM, inputs.subsidy, zeros(8760,1), ...
inputs.N_li_years, inputs.N_li_cycles, inputs.batt_price, Scen2.E_batt_req, 0, 0);
% Batt arbitrage economic metrics
Scen3.arb_E = sum(abs(min(Scen3.P,0)))/1e3;
[Scen3.LCoE, Scen3.LRoE, Scen3.LPoE, Scen3.Payb] = EcoMetrics(inputs.r,Scen3.R_arb,Scen3.arb_E,Scen3.CapEx,Scen3.OpEx, inputs.business.N_y);
Scen3.NPV = NPV(inputs.r,Scen3.R_arb,Scen3.CapEx,Scen3.OpEx, inputs.business.N_y);
[Scen3.IRR,~] = fsolve(@(r) NPV(r,Scen3.R_arb,Scen3.CapEx,Scen3.OpEx, inputs.business.N_y),0,optimoptions('fsolve','Display','none'));
[Scen3.LF, Scen3.VoSA] = StorageMetrics(Scen3.R_arb,Scen3.P,Scen2.E_batt_req,inputs.batt_type);
%% Scenario 4 AWE + Batt arbitrage
% AWE + Batt arbitrage bidding dispatch
[Scen4.SoC,Scen4.P] = Dispatcher(Scen4.w, Scen4.var, inputs.DAM, Scen1.P_sm, Scen1.E_res, inputs.batt_min*Scen2.E_batt_req, inputs.batt_max*Scen2.E_batt_req,...
Scen2.E_batt_req, inputs.batt_type, inputs.batt_eff);
% AWE + Batt arbitrage energy and profit performance
[Scen4.R_arb, Scen4.R_kite, Scen4.f_repl, Scen4.CapEx, Scen4.OpEx] = Scenperf(Scen1.P, Scen4.P, inputs.DAM, inputs.subsidy, Scen1.E_sm, ...
inputs.N_li_years, inputs.N_li_cycles, inputs.batt_price, Scen2.E_batt_req, Scen1.ICC, Scen1.OMC);
% AWE + Batt arbitrage economic metrics
Scen4.R = Scen4.R_arb + Scen4.R_kite;
Scen4.arb_E = sum(abs(min(Scen4.P,0)))/1e3;
Scen4.E_dis = Scen1.AEP + Scen4.arb_E;
[Scen4.LCoE, Scen4.LRoE, Scen4.LPoE, Scen4.Payb] = EcoMetrics(inputs.r,Scen4.R,Scen4.E_dis,Scen4.CapEx,Scen4.OpEx, inputs.business.N_y);
Scen4.NPV = NPV(inputs.r,Scen4.R,Scen4.CapEx,Scen4.OpEx, inputs.business.N_y);
[Scen4.IRR,~] = fsolve(@(r) NPV(r,Scen4.R,Scen4.CapEx,Scen4.OpEx, inputs.business.N_y),0,optimoptions('fsolve','Display','none'));
[Scen4.LF, Scen4.VoSA] = StorageMetrics(Scen4.R_arb,Scen4.P,Scen2.E_batt_req,inputs.batt_type);
%% Display
Scen4.f_cycles = (sum(abs(Scen4.P)) + sum(Scen1.E_sm))/(Scen2.E_batt_req*inputs.N_li_cycles);
Scen2.f_cycles = sum(Scen1.E_sm)/(Scen2.E_batt_req*inputs.N_li_cycles);
Scen4.arbprof = Scen4.R_arb - inputs.batt_price*Scen2.E_batt_req*(Scen4.f_cycles-Scen2.f_cycles);
% disp('---------------------------------------------------------')
% disp(['window = ',num2str(round(Scen4.w,2)),' hrs'])
% disp(['variance = ',num2str(round(Scen4.var,4)),' EUR/MWh'])
% disp(['Scenario 4 E_{dis} = ',num2str(round(Scen4.arb_E,4)),' MWh'])
% disp(['Scenario 4 IRR = ',num2str(round(Scen4.IRR*1e2,4)),' %'])
% disp(['Scenario 4 Arbitrage profit = ',num2str(round(Scen4.arbprof,4)),' EUR'])
Scen1.t_cyc = [0,1.05000000000000,59,60.0500000000000,64.0500000000000,75.0700000000000,79.0700000000000];
Scen1.P_e = [0,137.795628013230,131.353472847588,0,-24.6278969333646,-0.0354535056597164,0];
Scen1.P_m = [0,199.746972005509,191.796732567887,0,-19.1015675261193,-0.0274979846727906,0];
Scen1.P_m_avg = 148250.920152283/1e3;
Scen1.E_o = Scen1.P_e(3)*(Scen1.t_cyc(3)-Scen1.t_cyc(2)) + - Scen1.t_cyc(3)*100)/3600;
Scen1.E_i = (polyarea(Scen1.t_cyc(4:7),Scen1.P_e(4:7)) - (Scen1.t_cyc(7)-Scen1.t_cyc(4))*100)/3600;
% disp('---------------------------------------------------------')
% disp(['E_{e, o} - E_{e, avg} = ',num2str(round(Scen1.E_o,2)),' kWh'])
% disp(['E_{e, i} + E_{e, avg} = ',num2str(round(Scen1.E_i,2)),' kWh'])
%% Plots
% Scenario parameters
%%%%%%%%%%%%%%%%%%%%%
% plotScenParam(inputs.DAM, inputs.vw)
% AWE performance
%%%%%%%%%%%%%%%%%
plotAWEperf(Scen1.P, [0 0 0 0 6823.05494180757 20750.8552913604 40035.5511607199 63415.6188669052 85700.7504181529 99999.9999634139 99999.9999993995 100000.000000000 99999.9999612856 99999.9999939655 99999.9999993012 99999.9999999965 100000.000000000 100000.000000000 100000.000000000 100000 100000.000000000]'...
, inputs.vw, Scen1.P_e, Scen1.P_m, Scen1.P_m_avg, Scen1.t_cyc)
% Storage performance
%%%%%%%%%%%%%%%%%%%%%
% plotStorperf( Scen1, Scen2, Scen4)
% Arbitrage operation
%%%%%%%%%%%%%%%%%%%%%
% plotArbOpp(inputs, Scen1,Scen2, Scen3, Scen4)
% Plots Scenario 1
%%%%%%%%%%%%%%%%%%
% Scen1.SoC = zeros(8760,1);
% plotScenario(5950, inputs, Scen1, Scen1, Scen1.E_UC_req, inputs.N_UC_cycles)
% Plots Scenario 2
%%%%%%%%%%%%%%%%%%
% plotScenario(5950, inputs, Scen1, Scen2, Scen2.E_batt_req, inputs.N_li_cycles)
% Plots Scenario 3
%%%%%%%%%%%%%%%%%%
% Scen3.E_res = zeros(8760,1);
% Scen3.E_sm = zeros(8760,1);
% Scen3.P_sm = zeros(8760,1);
% plotScenario(5950, inputs, Scen3, Scen3, Scen2.E_batt_req, inputs.N_li_cycles)
% Plots Scenario 4
%%%%%%%%%%%%%%%%%%
% plotScenario(5950, inputs, Scen1, Scen4, Scen2.E_batt_req, inputs.N_li_cycles)
% Discussion
%%%%%%%%%%%%
% plotDiscuss(inputs, Scen1, Scen2, Scen3, Scen4)