|
37 | 37 | "cell_type": "code",
|
38 | 38 | "execution_count": 2,
|
39 | 39 | "metadata": {},
|
40 |
| - "outputs": [], |
| 40 | + "outputs": [ |
| 41 | + { |
| 42 | + "name": "stderr", |
| 43 | + "output_type": "stream", |
| 44 | + "text": [ |
| 45 | + "WARNING:py.warnings:/Users/rhammond/GitHub_Public/OpenOA/openoa/utils/plot.py:1514: DeprecationWarning: invalid escape sequence '\\c'\n", |
| 46 | + " label=f\"Max. Power Vane Angle = {round(curve_fit_params_ws[:,i,1].mean(),1)}$^\\circ$\", # noqa: W605\n", |
| 47 | + "\n", |
| 48 | + "WARNING:py.warnings:/Users/rhammond/GitHub_Public/OpenOA/openoa/analysis/electrical_losses.py:374: DeprecationWarning: invalid escape sequence '\\m'\n", |
| 49 | + " label=f\"Electrical Losses\\n$\\mu$={mean:.2%}, $\\sigma$={std:.2%}\", # noqa: W605\n", |
| 50 | + "\n", |
| 51 | + "WARNING:py.warnings:/Users/rhammond/GitHub_Public/OpenOA/openoa/analysis/electrical_losses.py:374: DeprecationWarning: invalid escape sequence '\\s'\n", |
| 52 | + " label=f\"Electrical Losses\\n$\\mu$={mean:.2%}, $\\sigma$={std:.2%}\", # noqa: W605\n", |
| 53 | + "\n" |
| 54 | + ] |
| 55 | + } |
| 56 | + ], |
41 | 57 | "source": [
|
42 | 58 | "# Import required packages\n",
|
43 | 59 | "import numpy as np\n",
|
|
231 | 247 | "\n",
|
232 | 248 | "Next we create a TIE object which will contain the analysis to be performed. The method has the ability to calculate uncertainty in the TIE metric through a Monte Carlo sampling of filtering thresholds, power data, and reanalysis product choices. For now, we turn this option off and run the method a single time.\n",
|
233 | 249 | "\n",
|
234 |
| - "**NOTE**: The inputs `wind_bin_threshold`, `max_power_filter`, and `correction_threshold` all default to UQ inputs, and so inputs must be provided to these parameters when running a single case (`UQ=False`)." |
| 250 | + "```{note}\n", |
| 251 | + "The inputs `wind_bin_threshold`, `max_power_filter`, and `correction_threshold` all default to UQ inputs, and so inputs must be provided to these parameters when running a single case (`UQ=False`).\n", |
| 252 | + "```" |
235 | 253 | ]
|
236 | 254 | },
|
237 | 255 | {
|
|
276 | 294 | "name": "stderr",
|
277 | 295 | "output_type": "stream",
|
278 | 296 | "text": [
|
279 |
| - "100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 2/2 [00:03<00:00, 1.61s/it]\n" |
| 297 | + "100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 2/2 [00:02<00:00, 1.22s/it]\n" |
280 | 298 | ]
|
281 | 299 | }
|
282 | 300 | ],
|
|
450 | 468 | "\n",
|
451 | 469 | "Now we will create a TIE object for calculating TIE and quantifying the uncertainty in our estimate. The method estimates uncertainty in the TIE metric through a Monte Carlo sampling of filtering thresholds, power data, and reanalysis product choices.\n",
|
452 | 470 | "\n",
|
453 |
| - "Note that we set the number of Monte Carlo simulations to only 100 in this example because of the relatively high computational effort required to perform a single iteration. In practice, a larger number of simulations is recommended (the default value is 2000).\n", |
| 471 | + "Note that we set the number of Monte Carlo simulations to only 75 in this example because of the relatively high computational effort required to perform a single iteration. In practice, a larger number of simulations is recommended (the default value is 2000).\n", |
454 | 472 | "\n",
|
455 | 473 | "With uncertainty quantification enabled (UQ=True), we can specify the assumed uncertainty of the SCADA power data (0.5% by default) and ranges of two key filtering thresholds from which the Monte Carlo simulations will sample. Specifically, these thresholds are applied to the bin_filter() function in the toolkits.filtering class of OpenOA.\n",
|
456 | 474 | "\n",
|
457 |
| - "Note that the following parameters are the default values." |
| 475 | + "```{note}\n", |
| 476 | + "1. The following parameters are the default values, except `num_sim`, which has been reduced to optimize runtime in the examples.\n", |
| 477 | + "2. `num_sim` is recommended to be significantly higher so that results will converge (the default value is 2000).\n", |
| 478 | + "```" |
458 | 479 | ]
|
459 | 480 | },
|
460 | 481 | {
|
|
466 | 487 | "ta=TurbineLongTermGrossEnergy(\n",
|
467 | 488 | " project,\n",
|
468 | 489 | " UQ=True, # enable uncertainty quantification\n",
|
469 |
| - " num_sim=100, # number of Monte Carlo simulations to perform\n", |
| 490 | + " num_sim=75, # number of Monte Carlo simulations to perform\n", |
470 | 491 | " wind_bin_threshold=(1, 3), # Data outside of a range of +-1 to +-3 standard deviations from the median for each power bin are discarded\n",
|
471 | 492 | " max_power_filter=(0.8, 0.9), # The bin filter will be applied up to fractions of turbine capacity from 80% to 90%\n",
|
472 | 493 | " uncertainty_scada=0.005, # Assumed uncertainty of SCADA power data (0.5%)\n",
|
|
499 | 520 | "name": "stderr",
|
500 | 521 | "output_type": "stream",
|
501 | 522 | "text": [
|
502 |
| - "100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 100/100 [02:57<00:00, 1.78s/it]\n" |
| 523 | + "100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 75/75 [02:05<00:00, 1.68s/it]\n" |
503 | 524 | ]
|
504 | 525 | }
|
505 | 526 | ],
|
|
524 | 545 | {
|
525 | 546 | "data": {
|
526 | 547 | "text/plain": [
|
527 |
| - "13574203.044895409" |
| 548 | + "13544928.004463477" |
528 | 549 | ]
|
529 | 550 | },
|
530 | 551 | "execution_count": 13,
|
|
544 | 565 | {
|
545 | 566 | "data": {
|
546 | 567 | "text/plain": [
|
547 |
| - "533395.2405247269" |
| 568 | + "147320.39759589723" |
548 | 569 | ]
|
549 | 570 | },
|
550 | 571 | "execution_count": 14,
|
|
565 | 586 | "name": "stdout",
|
566 | 587 | "output_type": "stream",
|
567 | 588 | "text": [
|
568 |
| - "Mean long-term turbine ideal energy is 13.6 GWh/year\n", |
569 |
| - "Uncertainty in long-term turbine ideal energy is 0.5 GWh/year, or 3.9% percent\n" |
| 589 | + "Mean long-term turbine ideal energy is 13.5 GWh/year\n", |
| 590 | + "Uncertainty in long-term turbine ideal energy is 0.1 GWh/year, or 1.1% percent\n" |
570 | 591 | ]
|
571 | 592 | }
|
572 | 593 | ],
|
|
582 | 603 | "cell_type": "markdown",
|
583 | 604 | "metadata": {},
|
584 | 605 | "source": [
|
585 |
| - "\n", |
586 | 606 | "As expected, the mean long-term TIE is close to the earlier estimate without uncertainty quantification. A relatively low uncertainty has been estimated for the TIE calculations. This is a result of the relatively close agreement between the two reanalysis products and the clean power curves plotted earlier."
|
587 | 607 | ]
|
588 | 608 | },
|
|
0 commit comments