条件风险价值CVaR内容介绍(MATLAB例程)

        在对微电网优化调度过程中,由于新能源机组出力和负荷的不确定性,若采用确定性的优化调度方案会存在一定的风险。当风电和光伏输出功率的实际值低于预测值时,需要增加可控机组出力或切除部分负荷;反之,若风电和光伏输出功率的实际值高于预测值时,则需要降低可控机组出力或者弃风弃光,这都会给系统带来运行费用增加的风险。因此,在微电网优化调度中通常采用CVaR(Condition Value at Risk, CVaR)来量化微电网中的不确定性因素带来的风险成本。
        CVaR是基于风险价值(Value at Risk, VaR)发展而来的,是在一定置信水平α下,损失超过VaR值时的条件均值[1]。VaR是指在一定的置信水平下,某一投资组合在未来某一时间段内的最大损失。假设x\in X^{n}是n维的决策向量,y\in Y^{m}为m维决定系统风险损失的随机向量f(y)为y的概率密度函数。系统的损失函数为h(x,y),则损失不超过某一估计值η的概率为:

        给定置信水平\alpha \in (0,1),当\psi (x,\eta )>\alpha时,η的最小值即为VaR值,即:

        此时,条件风险价值CVaR的表达式为:

        为了便于计算,引入辅助函数来计算CVaR的值[2],即:

        当随机变量y的概率分布解析表达式难以求取时,可以利用蒙特卡洛法来模拟样本数据,y1,y2,……,ym是y的m个样本,则CVaR的估计值为[3]:

式中,m为所有场景的数量,yk为第k个场景下随机变量的值,P^{k}为第k个场景发生的概率。此时
F_{\alpha }(x,\eta )的最小值即为CVaR,对应的\eta即为VaR。
        具体MATLAB编程可参考:条件风险价值CVaR例程(MATLAB实现)

参考文献

[1] Wei Zhinong, Chen Wei, Huang Wenjin, et al. Opitimal allocation model for multi-energy capacity of virtual power plant considering conditional value-at-risk[J]. Automation of Electric Power Sytems, 2018, 42(4): 39-46.

[2] Rockafellar R T, Uryasev S. Conditional value-at-risk for general loss distributions[J]. Journal of Banking and Finance, 2002, 26(7): 1443-1471.

[3] Liu Xingyu, Wen Buying, Jiang Yuewen. Study on rotary standby benefit of wind power system with conditional risk value[J]. Transactions of China Electrotechnical Society, 2017, 32(9): 169-178.

  • 10
    点赞
  • 17
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 1
    评论
以下是一个简单的MATLAB例程,演示了如何实现满足Wolfe条件的线搜索算法: ```matlab function [alpha, num_evals] = wolfe_search(f, g, x, p, alpha_init) % Set the initial values of alpha and other constants alpha = alpha_init; c1 = 1e-4; c2 = 0.9; max_evals = 100; num_evals = 0; % Evaluate the objective function and its gradient at the starting point f0 = f(x); g0 = g(x); % Loop until the Wolfe conditions are satisfied or the maximum number of % evaluations is reached while num_evals < max_evals % Evaluate the objective function and its gradient at the new point f1 = f(x + alpha*p); g1 = g(x + alpha*p); % Check the Armijo condition if f1 > f0 + c1*alpha*g0'*p break; end % Check the curvature condition if g1'*p < c2*g0'*p break; end % If both conditions are satisfied, return the current alpha value alpha_prev = alpha; alpha = 0.5*(alpha + alpha_init); num_evals = num_evals + 1; end % Return the number of function evaluations used if num_evals == max_evals fprintf('Maximum number of function evaluations reached\n'); end end ``` 该例程采用了传统的回溯线搜索算法,在每次迭代中计算一个新的alpha值,然后检查是否满足Armijo条件和曲率条件。如果两个条件都得到满足,就返回当前的alpha值。如果没有满足,则将alpha值减半并继续迭代,直到达到最大迭代次数或满足条件为止。 请注意,此代码仅为演示目的。在实际应用中,您可能需要根据您的需求进行修改。
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

贾贾乾杯

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值