Uncertainty Cost Functions for Renewable Generation: A Simplified
Approach using a Mixture of Uniform Probability Distribution
MUHAMMAD ATIQ UR REHMAN1, MIGUEL ROMERO-L2, SERGIO RAUL RIVERA3,*
1International Islamic University,
Islamabad,
PAKISTAN
2Sensoriolab,
COLOMBIA
3Universidad Nacional de Colombia,
COLOMBIA
Abstract: - Photovoltaic energy, wind energy, and plug-in electric/hybrid vehicles are being considered as
sources and loads, reflecting the increasing importance of renewable energy resources in new microgrids.
However, the stochastic behavior of variables such as wind turbine speed, solar irradiation intensity and, plug-
in electric vehicle dynamics, introduces uncertainties that could affect the economic dispatch of electric power.
This paper employs a mixture of uniform probability distribution (UPDs) techniques to characterize the
variability of the available power from renewable energy sources. We propose a new analytical expression
derived from the mixture of UPDs to calculate Uncertainty Cost Functions (UCFs), thereby assessing their
impact on the economic dispatch of power. Finally, we performed Montecarlo simulations to validate our UCF
methodology and its potential applicability in economic dispatch of power. The results demonstrate that our
methodology accurately calculates the underestimated and overestimated costs of uncertainty power generation.
This methodology holds the potential to optimize economic dispatch, thereby reducing costs and maximizing
power generation from the generators.
Key-Words: - Microgrids, Renewable Energy Resources, Stochastic Processes, Economic Dispatch, Renewable
Energy Resources: Photovoltaic energy, wind energy, and plug-in electric/hybrid vehicles.
Received: April 13, 2023. Revised: October 29, 2023. Accepted: November 27, 2023. Published: December 31, 2023.
1 Introduction
Photovoltaic energy generation (PVEG), wind
energy generation (WEG), and energy from plug-in
electric/hybrid vehicles (PEV/HEV) introduce
variable and uncertain scenarios regarding power
injection or demand on the grid. In traditional power
generation and dispatch, these energy generators are
typically treated without specific programming in
the optimization of power system operations.
However, these resources or loads can be effectively
modeled using probability distribution functions
(PDFs), [1] and integrated into the economic
dispatch of power. The introduction of PEV/HEV
into the power network further complicates the
uncertainty in modern power systems and smart
grids. These vehicles serve as energy storage
sources, loads, or power generators, exhibiting
probabilistic behaviors. To model this behavior
mathematically, Probability Distribution Functions
(PDFs) can be employed, specifically, we can use
expected values of a mixture of uniform probability
distributions (UPDs).
The primary objective of our research is to
mathematically formulate Uncertainty Cost
Functions (UCFs), derived from a mixture of
uniform probability distributions (UPDs). Through
this approach, we can define and compute the
analytical cost functions associated with
photovoltaic power generation (PVEG) and wind
power generation (WEG). Furthermore, this cost
framework seamlessly extends to the integration of
plug-in electric vehicles or hybrid electric vehicles
(PEV/HEV). These analytical functions undergo
rigorous validation via stochastic simulations of the
UPD mixture, ensuring the robustness and reliability
of our findings.
The variables of uncertainty associated with
economic dispatch in power systems become
notably complex with the integration of renewable
energy resources like PVEG, WEG, and PEV/HEV.
WSEAS TRANSACTIONS on POWER SYSTEMS
DOI: 10.37394/232016.2023.18.47
Muhammad Atiq Ur Rehman,
Miguel Romero-l, Sergio Raul Rivera
E-ISSN: 2224-350X
474
Volume 18, 2023
Evaluating the stochastic characteristics of these
resources and loads within power systems can yield
uncertainty cost functions as well as marginal
expressions. The analytical elaboration of these
functions, along with the derivatives of marginal
costs, is detailed in [2].
Uncertainty management is also integrated into
probability-controlled optimal power flow,
distinguishing it from traditional optimal power
flow control by incorporating the scheduling of
power generation based on state variables with
predefined limits. In contingency situations, where a
renewable energy source with high uncertainty
cannot meet the planned energy demand, the energy
flow should remain unaffected, representing a
preventive perspective. However, from a corrective
standpoint, adjustments in power distribution
become necessary to maintain the operating system
within acceptable limits post-event. In [3], a strategy
programmed and implemented through the
Matpower software is employed to provide a
preventive solution to optimal energy flow
constrained by contingencies. Consequently, these
software-based strategies can offer solutions for
both preventing and addressing contingencies for
ensuring optimal energy flow while accommodating
uncertainties.
UCFs are utilized to analyze the variability of
solar energy, wind energy, and electric/hybrid
vehicle resources, which can be effectively modeled
using established probability cost functions, [1]. The
stochastic effects of wind turbine speed, solar
irradiation intensity, and drive knocks have been
analyzed through the application of uniform cost
functions (UCFs) in [4]. The novelty of this research
lies in the analytical development of uncertainty
cost functions and their deterministic verification
based on the economic dispatch of power.
Uncertainty Cost Functions derived from a mixture
of uniform probability distributions (UPDs) are
employed to validate the formulated analytical
expected cost and penalty cost, [5]. Lastly, the
expected value of the penalty cost can be
determined based on the mean value of the available
power histogram shown in Figure 1.
This research paper is structured into several
sections. In Section 2, we introduce fundamental
concepts regarding UCFs and UPDs. We explore the
derivation of these functions from resulting
histograms. Subsections within Section 2 show the
mathematical aspects of uncertainty cost functions
derived from a mixture of uniform probability
distributions (UPDs). Through analytical
development, we can determine the UCFs and
estimate penalty costs associated with PVEG, WEG,
and PEV/HEV. In Section 3, we present the
validation and verification process of the
analytically developed UCFs based on a mixture of
uniform probability distributions. This validation is
compared with Monte Carlo simulations to ensure
accuracy and reliability. Finally, in Section 4, we
summarize our findings and provide insights for
future discussions and research directions.
2 Problem Formulation and
Analytical Solution: Development of
Uncertainty Cost Functions
There are several methods for function optimization
including heuristic computational techniques like
particle swarm optimization (PSO). Power flow
optimization can also be done by injecting the
reagents shunt capacitors or transformer taps, [6].
The PVEG, WEG and PEV/HEV resources and
loads have uncertainty factors, so the uncertain costs
are needed to integrate the injected variable power
and its consumption. The variability of factors is
based on the probability distribution of sources and
loads, [7].
While analyzing microgrids along with
renewable energy resources, patent research about
scientific and technological developments can be
important characteristics to publish scientific and
professional technology papers. Especially,
international patent classification can impart
important and valuable information about the
microgrids used in power systems to develop the
analytical perspective, [8].
The cost of uncertainty of renewable energy
sources and loads can be formulated in the form of
uncertainty cost functions in the microgrids
operations. Small hydropower plants in this context
can be used in the distribution probability of the
power plant. The analytical development for
uncertainty cost functions of such microgrids can be
formulated mathematically to
underestimate/overestimate power availability. The
validation in this regard is done by using Monte
Carlo simulation process, [9].
In an islanded microgrid case, the inverters can
surely provide droop control in frequency regulation
and required power dispatch even based on
reference values. The results of this control show
the improvement in frequency regulation due to
changes in networked microgrids’ inertia, [10].
To optimize the tension profiles and reagents
controlling power distribution, we can optimize the
capacitors’ location in the power system network.
The exhaustive search technique is used to optimize
WSEAS TRANSACTIONS on POWER SYSTEMS
DOI: 10.37394/232016.2023.18.47
Muhammad Atiq Ur Rehman,
Miguel Romero-l, Sergio Raul Rivera
E-ISSN: 2224-350X
475
Volume 18, 2023
it. In this technique, the dimensions are used to
evaluate several possibilities to find its solution and
algorithm computational iteration visualizations
give the solution optimum, [11].
Constrained handling rules in decomposition
methodology can be used to provide optimal power
flow during iterative computation for a security-
constrained problem. The stages for finding the
optimal power flow solution are the bases case
network and modification of potentially relevant
contingencies by updating the constraint limits. The
algorithm used is performing computations to find
the results in such problems, [12].
Uncertainty of PVEG, WEG, and PEV/HEV
generators/sources and loads in terms of economic
dispatch is formulated to cost functions analytically.
We can integrate these sources and loads to handle
the uncertainty mentioned. These uncertainty cost
functions for sources and loads can be verified and
validated in two ways:
o At any instant, the available power can
be verified in the form of a mixture of
uniform probability distributions.
o The Uncertainty Cost Functions can be
calculated with an analytical
development (presented in subsection
B), and they can be contrasted by
Montecarlo simulations, we can use two
and three uniform probability
distributions.
2.1 Power Histogram Description with Two
Uniform Distributions
To represent the available power of PVEG, WEG,
and PEV/HEV, this research considers two
uncertain representations: one with two uniform
distributions and the other with three distributions.
An example of the available power from renewables
can be described by using the power histogram
shown in Figure 1.
For the representation with two uniform
distributions, the scheduled power 󰇛󰇜 by the
operator can be categorized into two regions as
follows:
Case: A; Region I: is less than b and bigger
than a.
Case: B; Region II: is less than c and bigger
than b.
Fig. 1: Available power histogram (two uniform
distributions)
2.2 Mathematical formulation of Uncertainty
Cost Functions
The uncertainty cost function is a function in terms
of the scheduled power, 󰇛󰇜, coming from adding
two parts.
In this way, there are two components in the
uncertainty cost, the overestimation part
(), where the scheduled power ()
is bigger than the available power (), and the cost
for having a difference between represents
the use of energy storage systems for storage the
difference, valued with an overestimation constant
() and the probability of .
The second part, the underestimation part
(), where the scheduled power
() is less than the available power (), and the cost
for having a difference between represents
the use of energy storage systems for inject to the
network the difference, valued with an
underestimation constant () and the probability of
.
The total uncertainty cost functions can have the
following development cases based on the analytical
development of a mixture of probability
distributions (B1 and B2 subsections).
Case A, Region I:
If
o Step 1
=
󰇛󰇜
(Ao-1)
=
󰇛󰇜
WSEAS TRANSACTIONS on POWER SYSTEMS
DOI: 10.37394/232016.2023.18.47
Muhammad Atiq Ur Rehman,
Miguel Romero-l, Sergio Raul Rivera
E-ISSN: 2224-350X
476
Volume 18, 2023

󰇛󰇜
(Au-1)
o Step 2

 󰇣
󰇤 (Ao-2)


󰇻
+

󰇻
(Au-2)
o Step 3
=
 󰇣
󰇤
=
 󰇣
󰇤 (Ao-3)
 =
 󰇣
󰇤 +
 󰇣
󰇤
=
 󰇣
󰇤 + 󰇣
󰇤 (Au-3)
Case B, Region II:
If 
o Step 1

󰇛󰇜
󰇛󰇜
(Bo-1)

󰇛󰇜
(Bu-1)
o Step 2

 󰇣
󰇤 +
 󰇣
󰇤 (Bo-2)


󰇻
(Bu-2)
o Step 3

 󰇣󰇛󰇜
󰇤 +
󰇩
󰇪
=
 󰇣󰇛󰇜
󰇤 +
󰇩
󰇪
= 󰇣󰇛󰇜
󰇤
 󰇣
󰇤 (Bo-3)

 󰇣
󰇤
 󰇣

󰇤 (Bu-3)
3 Simulation and Validation for the
Problem Solution
To evaluate the analytical uncertainty cost
functions, we performed Montecarlo simulations to
obtain available power values from a mixture of
two UDP, representing the variability of a PVEG.
For each Ps value, we computed both
overestimation and underestimation costs, thereby
deriving the uncertainty cost for each specific
scenario. Subsequently, separate histograms
illustrating the costs attributed to underestimation
and overestimation are depicted.
The simulations were conducted to illustrate the
two cases outlined in the mathematical formulation
section. Figure 2 depicts the simulations for
Ps=30MW, corresponding to Case A, Region I: is
less than b and bigger than a (). Similarly, Figure
3 presents the results for Ps=70MW, corresponding
to Case B, Region II: is less than c and bigger
than b.
Fig. 2: Power histogram, costs histograms due to
WSEAS TRANSACTIONS on POWER SYSTEMS
DOI: 10.37394/232016.2023.18.47
Muhammad Atiq Ur Rehman,
Miguel Romero-l, Sergio Raul Rivera
E-ISSN: 2224-350X
477
Volume 18, 2023
underestimate and overestimate (= 30 MW)
Fig. 3: Power histogram, costs histograms due to
underestimate and overestimate (= 70MW)
According to Figure 2, the uncertainty costs for
underestimating the available power range between
0 and approximately 1550$. There is a gradual
accumulation of cases between 0 and 400$. In this
scenario, the expected costs for underestimating and
overestimating the available power are very similar.
In Figure 3, it is observed that the costs of
underestimating the available power range between
0 and $300. However, the costs of overestimating
the available power reach values of 4500$. A
significant number of cases are concentrated at the
highest cost values. In this instance, the expected
costs of overestimating the available power are
notably higher than the costs of underestimating.
In Figure 4, the Montecarlo run shows the
histogram illustrating the uncertainty cost for all
scenarios with = 30MW. The expected cost,
derived from these Montecarlo simulations, amounts
to 740.9090$. This value can be compared by
employing the expressions outlined in Case A from
the previous section:
UCF= 
where a=6.6780 MW, b=43.7734 MW, c=
80.8688 MW,
w1= 0.6, w2= 0.4 and = 30 MW. In this case,
the analytical expressions yield $741.7588,
indicating an error of 0.11%.
Fig. 4: UCF histogram (= 30 MW).
In Figure 5, Montecarlo run shows the histogram
for the uncertainty cost for the whole scenarios in
case = 70 MW, the expected cost of these
Montecarlo simulations is 2.157 $. This value can
be contrasted by applying the expressions of case A
of the previous section:
UCF= 
where a=6.6780 MW, b=43.7734 MW, c=
80.8688 MW, w1= 0.6, w2= 0.4 and = 30 MW. In
this case the analytical expressions give 2.159,2 $,
indicating an error of 0.11%.
Using the UCFs proposed in the previous section,
we calculated the uncertainty costs for different
values of , generating the total cost function. The
results for each value of are detailed in Table 1
and were compared with the Montecarlo
simulations. in Figure 6 we analyze the behavior of
the cost function in function of the variable .
Fig. 5: UCF histogram (= 70 MW)
WSEAS TRANSACTIONS on POWER SYSTEMS
DOI: 10.37394/232016.2023.18.47
Muhammad Atiq Ur Rehman,
Miguel Romero-l, Sergio Raul Rivera
E-ISSN: 2224-350X
478
Volume 18, 2023
Table 1. UCF data, Montecarlo, and analytical cases
According to the results presented in Table 1, the
cost values calculated from the proposed UCFs
closely align with those generated through Monte
Carlo simulations, which validates the efficacy of
the proposed approach. An advantage of this
approach lies in its ability to calculate costs
analytically, which simplifies the calculation
process in contrast to the Montecarlo simulation-
based determination of uncertainty cost. Moreover,
the proposed equations can provide detailed results
concerning the costs related to overestimation and
underestimation of available power.
Fig. 6: UCF vs
Figure 6 provides a comprehensive view of the
expected value of uncertainty costs across different
Ps values. This analysis reveals distinct trends in the
behavior of the proposed cost function. For low Ps
values, uncertainty costs remain low, as evidenced
in Figure 2, where the expected values of
underestimation and overestimation costs are
comparable. Furthermore, a specific Ps value is
identified where uncertainty costs reach their
minimum. This value has significant potential for
optimizing economic dispatch, enhancing power
availability, and mitigating uncertainty costs.
Conversely, as Ps increases, a discernible upward
trend is observed in uncertainty costs, consistent
with the findings in Figure 3, where the cost of
overestimation notably surpasses that of
underestimation. This analysis provides valuable
insights for generating agents and electricity market
operators, allowing them to reduce generation costs
and optimize economic dispatch more efficiently.
4 Conclusion
Please, follow our instructions faithfully, otherwise
you have to resubmit your full paper. This will
enable us to maintain uniformity in the conference
proceedings as well as in the post-conference
luxurious books by Press. Thank you for your
cooperation and contribution. We are looking
forward to seeing you at the Conference.
The economic dispatch of the energy scheduling
of uncertain sources and loads (PVEG, WEG, and
PEV/HEV) must include the tools and techniques to
reduce the penalty costs connected with the
scheduling. In this paper, an analytical development
approach is presented which is better to use as a tool
or technique. The mathematical formulation shows
it as an optimization technique based on the
stochastic economic dispatch technique. To
schedule reliable power, the penalty costs can affect
the supply of energy generating underestimate or
overestimate of power availability by using such
sources and loads. The uncertainty cost functions
(UCFs) can be used mathematically to calculate the
underestimated or overestimated costs of power
generation making the power system more stable in
electricity market. By using this research concept,
simple uncertainty cost functions can be used to
optimize the power flow because they have a
quadratic shape in nature and consist of optimal
solvers of power systems.
The analytically developed equations of
uncertainty cost functions are based on parameters
applied for several cases of PVEG, WEG, and
PEV/HEV sources and loads. We can vary these
parameters to optimize the economic dispatch of
power based on a mixture of probability
distributions and uncertainty cost functions to get
WSEAS TRANSACTIONS on POWER SYSTEMS
DOI: 10.37394/232016.2023.18.47
Muhammad Atiq Ur Rehman,
Miguel Romero-l, Sergio Raul Rivera
E-ISSN: 2224-350X
479
Volume 18, 2023
the maximum power from the generators. The
stochastic behavior of these resources and loads can
be used to estimate accurately the uncertainty costs
to optimize the power generation.
References:
[1] Y. Zhu and C. Singh, "Fast Uncertainty
Quantification of Electromechanical
Oscillation Frequency on Varying Generator
Damping," in Journal of Modern Power
Systems and Clean Energy, vol. 11, no. 6, pp.
2043-2048
[2] E. D. Reyes, A. S. Bretas, and S. Rivera,
“Marginal uncertainty cost functions for
solar photovoltaic, wind energy, hydro
generators, and plug-in electric vehicles,”
Energies, vol. 13, no. 23, 2020, doi:
10.3390/en13236375.
[3] L. M. Leon, A. S. Bretas, and S. Rivera,
“Quadratically constrained quadratic
programming formulation of contingency
constrained optimal power flow with
photovoltaic generation, Energies, vol. 13,
no. 13, 2020, doi: 10.3390/en13133310.
[4] G. Yuan, H. Mukaidani and T. Shima,
"Uncertainty Quantification in Neural
Networks Using Stochastic Differential
Equations," 2023 62nd Annual Conference of
the Society of Instrument and Control
Engineers (SICE), Tsu, Japan, 2023, pp.
1543-1548
[5] D. Wasif, Y. Wang, M. Shahzad, R. Triebel
and X. X. Zhu, "Towards a Benchmark EO
Semantic Segmentation Dataset for
Uncertainty Quantification," IGARSS 2023 -
2023 IEEE International Geoscience and
Remote Sensing Symposium, Pasadena, CA,
USA, 2023, pp. 5018-5021
[6] B. Avcı, A. Beke and T. Kumbasar,
"Towards Reliable Uncertainty
Quantification and High Precision with
General Type-2 Fuzzy Systems," 2023 IEEE
International Conference on Fuzzy Systems
(FUZZ), Incheon, Korea, Republic of, 2023,
pp. 1-6J.
[7] H. Lam, "Statistical Uncertainty
Quantification for Expensive Black-Box
Models: Methodologies and Input
Uncertainty Applications," 2023 Winter
Simulation Conference (WSC), San Antonio,
TX, USA, 2023, pp. 1501-1515
[8] G. Grigoryan and A. J. Collins, "Feature
Importance for Uncertainty Quantification In
Agent-Based Modeling," 2023 Winter
Simulation Conference (WSC), San Antonio,
TX, USA, 2023, pp. 233-242.
[9] R. Kiran and K. J. Vinoy, "A Stochastic
Radial Point Interpolation Method for
Uncertainty Analysis in Geometry," 2023
IEEE MTT-S International Conference on
Numerical Electromagnetic and Multiphysics
Modeling and Optimization (NEMO),
Winnipeg, MB, Canada, 2023, pp. 184-186.
[10] S. Cheng et al., "Machine Learning With
Data Assimilation and Uncertainty
Quantification for Dynamical Systems: A
Review," in IEEE/CAA Journal of
Automatica Sinica, vol. 10, no. 6, pp. 1361-
1387.
[11] P. Manfredi, "Probabilistic Uncertainty
Quantification of Microwave Circuits Using
Gaussian Processes," in IEEE Transactions
on Microwave Theory and Techniques, vol.
71, no. 6, pp. 2360-2372.
[12] A. J. Wilson, H. A. Tran and D. Lu,
"Uncertainty Quantification of Capacitor
Switching Transient Location Using
Machine Learning," in IEEE Transactions on
Power Systems, vol. 39, no. 2, pp. 2410-
2420.
Contribution of Individual Authors to the
Creation of a Scientific Article
- Romero and Rehman carried out the simulation
and the optimization.
- Rivera has implemented the Monte Carlo
Algorithm.
Sources of Funding for Research Presented in a
Scientific Article or Scientific Article Itself
No funding was received for conducting this study.
Conflict of Interest
The authors have no conflicts of interest to declare.
Creative Commons Attribution License 4.0
(Attribution 4.0 International, CC BY 4.0)
This article is published under the terms of the
Creative Commons Attribution License 4.0
https://creativecommons.org/licenses/by/4.0/deed.en
_US
WSEAS TRANSACTIONS on POWER SYSTEMS
DOI: 10.37394/232016.2023.18.47
Muhammad Atiq Ur Rehman,
Miguel Romero-l, Sergio Raul Rivera
E-ISSN: 2224-350X
480
Volume 18, 2023