diff --git a/Reports/Thesis/sections/results/models/comparison.tex b/Reports/Thesis/sections/results/models/comparison.tex index 162ff79..2f69eb6 100644 --- a/Reports/Thesis/sections/results/models/comparison.tex +++ b/Reports/Thesis/sections/results/models/comparison.tex @@ -38,3 +38,43 @@ After training the different models and experimenting with various hyperparamete A first recurring conclusion that can be made is that the \ac{NAQR} models have higher \ac{MSE} and \ac{MAE} errors but higher \ac{CRPS}. The reason for this behavior is not immediately clear. One reason for this could be the way the autoregressive quantile regression works. Autoregressive models use the previous predicted value as input to predict the next value. The autoregressive model does not know that it will be used to predict multiple values in the future. In the case of NRV modeling, a value is sampled as input for the next day. The sampling introduces an error which the model is not trained for. Because of this, the NRV distribution outputted by the model will be further away from the expected distribution. This error propagates further in the full-day NRV samples which results in a higher CRPS. The non-autoregressive models do not have this problem because they predict all values at once. The non-autoregressive models, however, have a higher \ac{MSE} and \ac{MAE} error. The model outputs a distribution for each quarter of the day. The full-day NRV sample is then generated by sampling from each of the distributions. The sampled values are independent of each other. This can result in unrealistic samples with large peaks which impact the \ac{MSE} and \ac{MAE} metrics. +Comparing the Linear model with the GRU model, the GRU model has a better performance when only using the NRV data. The autoregressive linear quantile regression model, however, outperforms the model using all available features. Some examples of the test set are shown in \ref{fig:ar_linear_gru_comparison}. A comparison is made between the autoregressive linear and GRU models. A clear difference in the confidence intervals can be observed. The confidence intervals almost have the same width over the whole day. This is not the case for the GRU model. The confidence intervals are wider in the middle of the day. This gives a more realistic insight into the uncertainty. + +\begin{figure}[H] + \centering + \begin{subfigure}[b]{0.49\textwidth} + \includegraphics[width=\textwidth]{images/quantile_regression/aqr_linear_model_samples/AQR_NRV_Load_Wind_PV_NP_QE-Sample_864.png} + \end{subfigure} + \hfill + \begin{subfigure}[b]{0.49\textwidth} + \includegraphics[width=\textwidth]{images/quantile_regression/aqr_gru_model_examples/AQR_GRU_NRV_Load_Wind_PV_NP_QE-Sample_864.png} + \end{subfigure} + \begin{subfigure}[b]{0.49\textwidth} + \includegraphics[width=\textwidth]{images/quantile_regression/aqr_linear_model_samples/AQR_NRV_Load_Wind_PV_NP_QE-Sample_4320.png} + \end{subfigure} + \hfill + \begin{subfigure}[b]{0.49\textwidth} + \includegraphics[width=\textwidth]{images/quantile_regression/aqr_gru_model_examples/AQR_GRU_NRV_Load_Wind_PV_NP_QE-Sample_4320.png} + \end{subfigure} + \begin{subfigure}[b]{0.49\textwidth} + \includegraphics[width=\textwidth]{images/quantile_regression/aqr_linear_model_samples/AQR_NRV_Load_Wind_PV_NP_QE-Sample_6336.png} + \end{subfigure} + \hfill + \begin{subfigure}[b]{0.49\textwidth} + \includegraphics[width=\textwidth]{images/quantile_regression/aqr_gru_model_examples/AQR_GRU_NRV_Load_Wind_PV_NP_QE-Sample_6336.png} + \end{subfigure} + \begin{subfigure}[b]{0.49\textwidth} + \includegraphics[width=\textwidth]{images/quantile_regression/aqr_linear_model_samples/AQR_NRV_Load_Wind_PV_NP_QE-Sample_7008.png} + \caption{Autoregressive linear model} + \end{subfigure} + \hfill + \begin{subfigure}[b]{0.49\textwidth} + \includegraphics[width=\textwidth]{images/quantile_regression/aqr_gru_model_examples/AQR_GRU_NRV_Load_Wind_PV_NP_QE-Sample_7008.png} + \caption{Autoregressive GRU model} + \end{subfigure} + + \caption{Comparison of the autoregressive linear and GRU model} + \label{fig:ar_linear_gru_comparison} +\end{figure} + +% other conclusion: diff --git a/Reports/Thesis/sections/results/policies/nrv_samples_policy.tex b/Reports/Thesis/sections/results/policies/nrv_samples_policy.tex index c9ce139..e8a4a03 100644 --- a/Reports/Thesis/sections/results/policies/nrv_samples_policy.tex +++ b/Reports/Thesis/sections/results/policies/nrv_samples_policy.tex @@ -5,5 +5,4 @@ The generated full-day samples can be used to improve the profit of the policy. % TODO: Compare with baselines % TODO: explain further -An observation that can be made is that the metrics used to evaluate the NRV predictions, do not necessarily correlate with the profit that can be made using the predictions. This means the best model in terms of the metrics does not necessarily result in the best profit. During the training, the profit should be used as a metric to evaluate the models but this becomes computationally expensive. - +An observation that can be made is that the metrics used to evaluate the NRV predictions, do not necessarily correlate with the profit that can be made using the predictions. This means the best model in terms of the metrics does not necessarily result in the best profit. During the training, the profit should be used as a metric to evaluate the models but this becomes computationally expensive. Because of this, the policy now will only be evaluated after the training is done. The profit can give a better insight if the model improves the profit compared to the baselines. diff --git a/Reports/Thesis/verslag 10.synctex.gz b/Reports/Thesis/verslag 10.synctex.gz new file mode 100644 index 0000000..a244560 Binary files /dev/null and b/Reports/Thesis/verslag 10.synctex.gz differ diff --git a/Reports/Thesis/verslag 11.synctex.gz b/Reports/Thesis/verslag 11.synctex.gz new file mode 100644 index 0000000..56a3f19 Binary files /dev/null and b/Reports/Thesis/verslag 11.synctex.gz differ diff --git a/Reports/Thesis/verslag 12.synctex.gz b/Reports/Thesis/verslag 12.synctex.gz new file mode 100644 index 0000000..e898648 Binary files /dev/null and b/Reports/Thesis/verslag 12.synctex.gz differ diff --git a/Reports/Thesis/verslag 13.synctex.gz b/Reports/Thesis/verslag 13.synctex.gz new file mode 100644 index 0000000..0f652b3 Binary files /dev/null and b/Reports/Thesis/verslag 13.synctex.gz differ diff --git a/Reports/Thesis/verslag 14.synctex.gz b/Reports/Thesis/verslag 14.synctex.gz new file mode 100644 index 0000000..0f652b3 Binary files /dev/null and b/Reports/Thesis/verslag 14.synctex.gz differ diff --git a/Reports/Thesis/verslag 15.synctex.gz b/Reports/Thesis/verslag 15.synctex.gz new file mode 100644 index 0000000..aa2b1cf Binary files /dev/null and b/Reports/Thesis/verslag 15.synctex.gz differ diff --git a/Reports/Thesis/verslag 16.synctex.gz b/Reports/Thesis/verslag 16.synctex.gz new file mode 100644 index 0000000..8125637 Binary files /dev/null and b/Reports/Thesis/verslag 16.synctex.gz differ diff --git a/Reports/Thesis/verslag 17.synctex.gz b/Reports/Thesis/verslag 17.synctex.gz new file mode 100644 index 0000000..8c7d715 Binary files /dev/null and b/Reports/Thesis/verslag 17.synctex.gz differ diff --git a/Reports/Thesis/verslag 18.synctex.gz b/Reports/Thesis/verslag 18.synctex.gz new file mode 100644 index 0000000..2a71351 Binary files /dev/null and b/Reports/Thesis/verslag 18.synctex.gz differ diff --git a/Reports/Thesis/verslag 19.synctex.gz b/Reports/Thesis/verslag 19.synctex.gz new file mode 100644 index 0000000..dff325b Binary files /dev/null and b/Reports/Thesis/verslag 19.synctex.gz differ diff --git a/Reports/Thesis/verslag 2.synctex.gz b/Reports/Thesis/verslag 2.synctex.gz new file mode 100644 index 0000000..f4f8553 Binary files /dev/null and b/Reports/Thesis/verslag 2.synctex.gz differ diff --git a/Reports/Thesis/verslag 3.synctex.gz b/Reports/Thesis/verslag 3.synctex.gz new file mode 100644 index 0000000..ae90e13 Binary files /dev/null and b/Reports/Thesis/verslag 3.synctex.gz differ diff --git a/Reports/Thesis/verslag 4.synctex.gz b/Reports/Thesis/verslag 4.synctex.gz new file mode 100644 index 0000000..c2194bc Binary files /dev/null and b/Reports/Thesis/verslag 4.synctex.gz differ diff --git a/Reports/Thesis/verslag 5.synctex.gz b/Reports/Thesis/verslag 5.synctex.gz new file mode 100644 index 0000000..bcbc46b Binary files /dev/null and b/Reports/Thesis/verslag 5.synctex.gz differ diff --git a/Reports/Thesis/verslag 6.synctex.gz b/Reports/Thesis/verslag 6.synctex.gz new file mode 100644 index 0000000..17f2749 Binary files /dev/null and b/Reports/Thesis/verslag 6.synctex.gz differ diff --git a/Reports/Thesis/verslag 7.synctex.gz b/Reports/Thesis/verslag 7.synctex.gz new file mode 100644 index 0000000..6422847 Binary files /dev/null and b/Reports/Thesis/verslag 7.synctex.gz differ diff --git a/Reports/Thesis/verslag 8.synctex.gz b/Reports/Thesis/verslag 8.synctex.gz new file mode 100644 index 0000000..18fc7e7 Binary files /dev/null and b/Reports/Thesis/verslag 8.synctex.gz differ diff --git a/Reports/Thesis/verslag 9.synctex.gz b/Reports/Thesis/verslag 9.synctex.gz new file mode 100644 index 0000000..956abb1 Binary files /dev/null and b/Reports/Thesis/verslag 9.synctex.gz differ diff --git a/Reports/Thesis/verslag.aux b/Reports/Thesis/verslag.aux index 475aca7..e41a620 100644 --- a/Reports/Thesis/verslag.aux +++ b/Reports/Thesis/verslag.aux @@ -101,25 +101,27 @@ \ACRO{recordpage}{MAE}{40}{1}{39} \ACRO{recordpage}{MSE}{40}{1}{39} \ACRO{recordpage}{MAE}{40}{1}{39} -\@writefile{toc}{\contentsline {section}{\numberline {7}Policies for battery optimization}{40}{section.7}\protected@file@percent } -\@writefile{toc}{\contentsline {subsection}{\numberline {7.1}Baselines}{40}{subsection.7.1}\protected@file@percent } -\ACRO{recordpage}{NRV}{41}{1}{40} -\ACRO{recordpage}{NRV}{41}{1}{40} +\@writefile{lof}{\contentsline {figure}{\numberline {15}{\ignorespaces Comparison of the autoregressive linear and GRU model\relax }}{40}{figure.caption.26}\protected@file@percent } +\newlabel{fig:ar_linear_gru_comparison}{{15}{40}{Comparison of the autoregressive linear and GRU model\relax }{figure.caption.26}{}} +\@writefile{toc}{\contentsline {section}{\numberline {7}Policies for battery optimization}{41}{section.7}\protected@file@percent } +\@writefile{toc}{\contentsline {subsection}{\numberline {7.1}Baselines}{41}{subsection.7.1}\protected@file@percent } \ACRO{recordpage}{NRV}{42}{1}{41} \ACRO{recordpage}{NRV}{42}{1}{41} -\ACRO{recordpage}{NRV}{42}{1}{41} -\ACRO{recordpage}{NRV}{42}{1}{41} -\ACRO{recordpage}{NRV}{42}{1}{41} -\ACRO{recordpage}{NRV}{42}{1}{41} -\ACRO{recordpage}{NRV}{42}{1}{41} -\@writefile{lot}{\contentsline {table}{\numberline {11}{\ignorespaces Results of the baseline policies on the test set. \relax }}{41}{table.caption.26}\protected@file@percent } -\newlabel{tab:fixed_thresholds}{{11}{41}{Results of the baseline policies on the test set. \relax }{table.caption.26}{}} -\@writefile{toc}{\contentsline {subsection}{\numberline {7.2}Policy using generated NRV samples}{41}{subsection.7.2}\protected@file@percent } +\ACRO{recordpage}{NRV}{43}{1}{42} +\ACRO{recordpage}{NRV}{43}{1}{42} +\ACRO{recordpage}{NRV}{43}{1}{42} +\ACRO{recordpage}{NRV}{43}{1}{42} +\ACRO{recordpage}{NRV}{43}{1}{42} +\ACRO{recordpage}{NRV}{43}{1}{42} +\ACRO{recordpage}{NRV}{43}{1}{42} +\@writefile{lot}{\contentsline {table}{\numberline {11}{\ignorespaces Results of the baseline policies on the test set. \relax }}{42}{table.caption.27}\protected@file@percent } +\newlabel{tab:fixed_thresholds}{{11}{42}{Results of the baseline policies on the test set. \relax }{table.caption.27}{}} +\@writefile{toc}{\contentsline {subsection}{\numberline {7.2}Policy using generated NRV samples}{42}{subsection.7.2}\protected@file@percent } \ACRO{total-barriers}{1} -\abx@aux@page{6}{43} -\abx@aux@page{7}{43} -\abx@aux@page{8}{43} -\abx@aux@page{9}{43} +\abx@aux@page{6}{44} +\abx@aux@page{7}{44} +\abx@aux@page{8}{44} +\abx@aux@page{9}{44} \ACRO{usage}{QR=={0}} \ACRO{usage}{AQR=={0}} \ACRO{usage}{NAQR=={1}} @@ -133,11 +135,11 @@ \ACRO{pages}{CRPS=={39@1@38|40@1@39}} \ACRO{pages}{MSE=={39@1@38|40@1@39}} \ACRO{pages}{MAE=={39@1@38|40@1@39}} -\ACRO{pages}{NRV=={41@1@40|42@1@41}} +\ACRO{pages}{NRV=={42@1@41|43@1@42}} \abx@aux@read@bbl@mdfivesum{5DC935CC8C8FAB8A3CAF97A486ED2386} \abx@aux@read@bblrerun \abx@aux@defaultrefcontext{0}{dumas_deep_2022}{nyt/global//global/global} \abx@aux@defaultrefcontext{0}{lu_scenarios_2022}{nyt/global//global/global} \abx@aux@defaultrefcontext{0}{poggi_electricity_2023}{nyt/global//global/global} \abx@aux@defaultrefcontext{0}{weron_electricity_2014}{nyt/global//global/global} -\gdef \@abspage@last{44} +\gdef \@abspage@last{45} diff --git a/Reports/Thesis/verslag.log b/Reports/Thesis/verslag.log index deda251..0925d62 100644 --- a/Reports/Thesis/verslag.log +++ b/Reports/Thesis/verslag.log @@ -1,4 +1,4 @@ -This is pdfTeX, Version 3.141592653-2.6-1.40.25 (TeX Live 2023) (preloaded format=pdflatex 2023.9.17) 9 MAY 2024 18:19 +This is pdfTeX, Version 3.141592653-2.6-1.40.25 (TeX Live 2023) (preloaded format=pdflatex 2023.9.17) 10 MAY 2024 00:24 entering extended mode restricted \write18 enabled. file:line:error style messages enabled. @@ -1728,14 +1728,47 @@ Package pdftex.def Info: images/diffusion/results/intermediates/Testing Intermed LaTeX Warning: `h' float specifier changed to `ht'. -[37]) (./sections/results/models/comparison.tex [38 <./images/diffusion/results/intermediates/Testing Intermediates 864_Sample intermediate 1_00000000.jpeg> <./images/diffusion/results/intermediates/Testing Intermediates 864_Sample intermediate 2_00000000.jpeg> <./images/diffusion/results/intermediates/Testing Intermediates 864_Sample intermediate 3_00000000.jpeg> <./images/diffusion/results/intermediates/Testing Intermediates 864_Sample intermediate 4_00000000.jpeg>]) [39] (./sections/results/policies/baselines.tex [40] +[37]) (./sections/results/models/comparison.tex [38 <./images/diffusion/results/intermediates/Testing Intermediates 864_Sample intermediate 1_00000000.jpeg> <./images/diffusion/results/intermediates/Testing Intermediates 864_Sample intermediate 2_00000000.jpeg> <./images/diffusion/results/intermediates/Testing Intermediates 864_Sample intermediate 3_00000000.jpeg> <./images/diffusion/results/intermediates/Testing Intermediates 864_Sample intermediate 4_00000000.jpeg>] [39] +File: images/quantile_regression/aqr_linear_model_samples/AQR_NRV_Load_Wind_PV_NP_QE-Sample_864.png Graphic file (type png) + +Package pdftex.def Info: images/quantile_regression/aqr_linear_model_samples/AQR_NRV_Load_Wind_PV_NP_QE-Sample_864.png used on input line 46. +(pdftex.def) Requested size: 223.07211pt x 112.49284pt. +File: images/quantile_regression/aqr_gru_model_examples/AQR_GRU_NRV_Load_Wind_PV_NP_QE-Sample_864.png Graphic file (type png) + +Package pdftex.def Info: images/quantile_regression/aqr_gru_model_examples/AQR_GRU_NRV_Load_Wind_PV_NP_QE-Sample_864.png used on input line 50. +(pdftex.def) Requested size: 223.07211pt x 112.49284pt. +File: images/quantile_regression/aqr_linear_model_samples/AQR_NRV_Load_Wind_PV_NP_QE-Sample_4320.png Graphic file (type png) + +Package pdftex.def Info: images/quantile_regression/aqr_linear_model_samples/AQR_NRV_Load_Wind_PV_NP_QE-Sample_4320.png used on input line 53. +(pdftex.def) Requested size: 223.07211pt x 112.49284pt. +File: images/quantile_regression/aqr_gru_model_examples/AQR_GRU_NRV_Load_Wind_PV_NP_QE-Sample_4320.png Graphic file (type png) + +Package pdftex.def Info: images/quantile_regression/aqr_gru_model_examples/AQR_GRU_NRV_Load_Wind_PV_NP_QE-Sample_4320.png used on input line 57. +(pdftex.def) Requested size: 223.07211pt x 112.49284pt. +File: images/quantile_regression/aqr_linear_model_samples/AQR_NRV_Load_Wind_PV_NP_QE-Sample_6336.png Graphic file (type png) + +Package pdftex.def Info: images/quantile_regression/aqr_linear_model_samples/AQR_NRV_Load_Wind_PV_NP_QE-Sample_6336.png used on input line 60. +(pdftex.def) Requested size: 223.07211pt x 112.49284pt. +File: images/quantile_regression/aqr_gru_model_examples/AQR_GRU_NRV_Load_Wind_PV_NP_QE-Sample_6336.png Graphic file (type png) + +Package pdftex.def Info: images/quantile_regression/aqr_gru_model_examples/AQR_GRU_NRV_Load_Wind_PV_NP_QE-Sample_6336.png used on input line 64. +(pdftex.def) Requested size: 223.07211pt x 112.49284pt. +File: images/quantile_regression/aqr_linear_model_samples/AQR_NRV_Load_Wind_PV_NP_QE-Sample_7008.png Graphic file (type png) + +Package pdftex.def Info: images/quantile_regression/aqr_linear_model_samples/AQR_NRV_Load_Wind_PV_NP_QE-Sample_7008.png used on input line 67. +(pdftex.def) Requested size: 223.07211pt x 112.49284pt. +File: images/quantile_regression/aqr_gru_model_examples/AQR_GRU_NRV_Load_Wind_PV_NP_QE-Sample_7008.png Graphic file (type png) + +Package pdftex.def Info: images/quantile_regression/aqr_gru_model_examples/AQR_GRU_NRV_Load_Wind_PV_NP_QE-Sample_7008.png used on input line 72. +(pdftex.def) Requested size: 223.07211pt x 112.49284pt. +) [40] (./sections/results/policies/baselines.tex [41] Underfull \hbox (badness 10000) in paragraph at lines 6--7 [] LaTeX Font Info: Font shape `TS1/LinuxLibertineT-TLF/b/n' will be (Font) scaled to size 12.0pt on input line 12. -) (./sections/results/policies/nrv_samples_policy.tex)) [41{/usr/local/texlive/2023/texmf-dist/fonts/enc/dvips/libertine/lbtn_7f4ce4.enc}] [42] [43] (./verslag.aux (./sections/introduction.aux) (./sections/background.aux) (./sections/policies.aux) (./sections/literature_study.aux)) +) (./sections/results/policies/nrv_samples_policy.tex)) [42{/usr/local/texlive/2023/texmf-dist/fonts/enc/dvips/libertine/lbtn_7f4ce4.enc}] [43] [44] (./verslag.aux (./sections/introduction.aux) (./sections/background.aux) (./sections/policies.aux) (./sections/literature_study.aux)) LaTeX Warning: There were undefined references. @@ -1751,18 +1784,18 @@ Package logreq Info: Writing requests to 'verslag.run.xml'. ) Here is how much of TeX's memory you used: - 41795 strings out of 476025 - 868671 string characters out of 5790017 + 41798 strings out of 476025 + 868725 string characters out of 5790017 1884388 words of memory out of 5000000 - 61395 multiletter control sequences out of 15000+600000 - 606964 words of font info for 100 fonts, out of 8000000 for 9000 + 61396 multiletter control sequences out of 15000+600000 + 606965 words of font info for 100 fonts, out of 8000000 for 9000 1141 hyphenation exceptions out of 8191 84i,16n,131p,2100b,5180s stack positions out of 10000i,1000n,20000p,200000b,200000s -Output written on verslag.pdf (44 pages, 8230420 bytes). +Output written on verslag.pdf (45 pages, 8231760 bytes). PDF statistics: - 620 PDF objects out of 1000 (max. 8388607) - 458 compressed objects within 5 object streams - 113 named destinations out of 1000 (max. 500000) + 627 PDF objects out of 1000 (max. 8388607) + 464 compressed objects within 5 object streams + 115 named destinations out of 1000 (max. 500000) 526 words of extra memory for PDF output out of 10000 (max. 10000000) diff --git a/Reports/Thesis/verslag.pdf b/Reports/Thesis/verslag.pdf index 8d45ea6..42f7d08 100644 Binary files a/Reports/Thesis/verslag.pdf and b/Reports/Thesis/verslag.pdf differ diff --git a/Reports/Thesis/verslag.synctex.gz b/Reports/Thesis/verslag.synctex.gz index 8c7d715..f65c952 100644 Binary files a/Reports/Thesis/verslag.synctex.gz and b/Reports/Thesis/verslag.synctex.gz differ diff --git a/Reports/Thesis/verslag.toc b/Reports/Thesis/verslag.toc index 7a4b39d..482a517 100644 --- a/Reports/Thesis/verslag.toc +++ b/Reports/Thesis/verslag.toc @@ -28,6 +28,6 @@ \contentsline {subsubsection}{\numberline {6.2.3}GRU Model}{32}{subsubsection.6.2.3}% \contentsline {subsection}{\numberline {6.3}Diffusion}{36}{subsection.6.3}% \contentsline {subsection}{\numberline {6.4}Comparison}{38}{subsection.6.4}% -\contentsline {section}{\numberline {7}Policies for battery optimization}{40}{section.7}% -\contentsline {subsection}{\numberline {7.1}Baselines}{40}{subsection.7.1}% -\contentsline {subsection}{\numberline {7.2}Policy using generated NRV samples}{41}{subsection.7.2}% +\contentsline {section}{\numberline {7}Policies for battery optimization}{41}{section.7}% +\contentsline {subsection}{\numberline {7.1}Baselines}{41}{subsection.7.1}% +\contentsline {subsection}{\numberline {7.2}Policy using generated NRV samples}{42}{subsection.7.2}% diff --git a/src/policies/PolicyEvaluator.py b/src/policies/PolicyEvaluator.py index 2a97854..e4879ff 100644 --- a/src/policies/PolicyEvaluator.py +++ b/src/policies/PolicyEvaluator.py @@ -230,6 +230,7 @@ class PolicyEvaluator: "Charge Cycles", "Charge Threshold", "Discharge Threshold", + "State of Charge", ], )