基于博弈论的计及需求响应微电网(风、光、储能)优化调度研究(Python代码实现)

本文探讨了使用博弈论方法在微电网中进行风能、太阳能和储能电池的优化调度,通过Python实现的模拟器模拟电力消费者的决策过程,以提升微电网的能源效率和经济效益。研究关注需求响应的影响,揭示了参与者策略对系统性能的关键作用。
摘要由CSDN通过智能技术生成

 💥💥💞💞欢迎来到本博客❤️❤️💥💥

🏆博主优势:🌞🌞🌞博客内容尽量做到思维缜密,逻辑清晰,为了方便读者。

⛳️座右铭:行百里者,半于九十。

📋📋📋本文目录如下:🎁🎁🎁

目录

💥1 概述

📚2 运行结果

🎉3 参考文献

🌈4 Python代码实现


💥1 概述

基于博弈论的微电网调度风、光、储优化调度研究从博弈论的角度出发,探讨了在微电网中利用风能、太阳能和储能电池进行优化调度的方法。具体而言,研究采用了一种基于Python实现的微电网游戏运营模拟器,旨在模拟电力消费者(即玩家)与微电网之间的互动过程,实现对微电网运营的优化调度。在这个模拟器中,参与者能够体验到在微电网系统中利用可再生能源和储能电池的种种挑战与机遇,从而更好地理解和掌握微电网运营的关键因素。

通过这个模拟器,用户可以深入了解微电网系统中各种因素之间的相互影响,包括电力需求、可再生能源的波动性、储能电池的能量储存与释放等。通过参与模拟游戏,用户可以学习到如何在实际运营中调度风能、太阳能和储能电池,以最大程度地提高微电网系统的能源利用效率,降低运营成本,同时确保系统的稳定性和可靠性。这种基于博弈论的研究方法为微电网运营提供了一种新的视角和思路,有助于推动微电网领域的发展与应用。

基于博弈论的计及需求响应微电网(风、光、储能)优化调度研究探讨了在微电网系统中综合考虑风能、太阳能和储能电池的优化调度方法。通过引入博弈论的分析框架,研究旨在研究电力市场参与者之间的策略选择和博弈行为,以实现微电网系统的最优调度和能源利用效率。

在这项研究中,着重考虑了需求响应这一关键因素,将电力消费者的行为和反馈纳入微电网运行模型中。通过优化调度算法和博弈论模型,研究者可以更好地理解不同参与者之间的利益博弈、合作与竞争关系,进而制定出最优的调度策略。这种研究方法不仅能够有效提高微电网系统的整体性能,还可以促进微电网的可持续发展和智能运营。

通过对微电网系统中风能、太阳能和储能电池的协同调度进行深入研究,这项基于博弈论的优化调度研究为未来微电网的发展提供了有益的理论支持和实践指导,有助于推动微电网技术的进步和应用。

📚2 运行结果

Hour 1 - Player 1: Demand (kWh) = 25.82, Cost Savings ($) = 2.24, Strategy = cooperate
Hour 1 - Player 2: Demand (kWh) = 29.82, Cost Savings ($) = 1.19, Strategy = cooperate
Hour 1 - Renewable Generation: Solar (kWh) = 0.00, Wind (kWh) = 19.38
Hour 1 - Battery State of Charge (kWh): 1.74
Hour 1 - Total Cost Savings ($): 3.43
Hour 2 - Player 1: Demand (kWh) = 25.88, Cost Savings ($) = 1.00, Strategy = cooperate
Hour 2 - Player 2: Demand (kWh) = 26.01, Cost Savings ($) = 1.00, Strategy = compete
Hour 2 - Renewable Generation: Solar (kWh) = 0.85, Wind (kWh) = 17.59
Hour 2 - Battery State of Charge (kWh): 1.83
Hour 2 - Total Cost Savings ($): 2.00
Hour 3 - Player 1: Demand (kWh) = 26.64, Cost Savings ($) = 1.10, Strategy = cooperate
Hour 3 - Player 2: Demand (kWh) = 31.45, Cost Savings ($) = 1.30, Strategy = compete
Hour 3 - Renewable Generation: Solar (kWh) = 3.35, Wind (kWh) = 25.08
Hour 3 - Battery State of Charge (kWh): 2.74
Hour 3 - Total Cost Savings ($): 2.40
Hour 4 - Player 1: Demand (kWh) = 14.56, Cost Savings ($) = 0.60, Strategy = cooperate
Hour 4 - Player 2: Demand (kWh) = 18.81, Cost Savings ($) = 2.92, Strategy = compete
Hour 4 - Renewable Generation: Solar (kWh) = 7.32, Wind (kWh) = 5.35
Hour 4 - Battery State of Charge (kWh): 1.41
Hour 4 - Total Cost Savings ($): 3.52
Hour 5 - Player 1: Demand (kWh) = 28.78, Cost Savings ($) = 1.60, Strategy = cooperate
Hour 5 - Player 2: Demand (kWh) = 24.08, Cost Savings ($) = 0.90, Strategy = compete
Hour 5 - Renewable Generation: Solar (kWh) = 12.50, Wind (kWh) = 8.22
Hour 5 - Battery State of Charge (kWh): 2.01
Hour 5 - Total Cost Savings ($): 2.50
Hour 6 - Player 1: Demand (kWh) = 21.95, Cost Savings ($) = 0.50, Strategy = compete
Hour 6 - Player 2: Demand (kWh) = 14.39, Cost Savings ($) = 0.60, Strategy = compete
Hour 6 - Renewable Generation: Solar (kWh) = 18.53, Wind (kWh) = 12.27
Hour 6 - Battery State of Charge (kWh): 2.97
Hour 6 - Total Cost Savings ($): 1.10
Hour 7 - Player 1: Demand (kWh) = 31.86, Cost Savings ($) = 0.70, Strategy = compete
Hour 7 - Player 2: Demand (kWh) = 26.03, Cost Savings ($) = 1.10, Strategy = compete
Hour 7 - Renewable Generation: Solar (kWh) = 25.00, Wind (kWh) = 13.14
Hour 7 - Battery State of Charge (kWh): 3.73
Hour 7 - Total Cost Savings ($): 1.80
Hour 8 - Player 1: Demand (kWh) = 18.22, Cost Savings ($) = 0.40, Strategy = compete
Hour 8 - Player 2: Demand (kWh) = 17.26, Cost Savings ($) = 0.70, Strategy = compete
Hour 8 - Renewable Generation: Solar (kWh) = 31.47, Wind (kWh) = 20.57
Hour 8 - Battery State of Charge (kWh): 5.06
Hour 8 - Total Cost Savings ($): 1.10
Hour 9 - Player 1: Demand (kWh) = 22.16, Cost Savings ($) = 0.50, Strategy = compete
Hour 9 - Player 2: Demand (kWh) = 23.07, Cost Savings ($) = 0.90, Strategy = compete
Hour 9 - Renewable Generation: Solar (kWh) = 37.50, Wind (kWh) = 5.86
Hour 9 - Battery State of Charge (kWh): 4.41
Hour 9 - Total Cost Savings ($): 1.40
Hour 10 - Player 1: Demand (kWh) = 20.21, Cost Savings ($) = 0.50, Strategy = compete
Hour 10 - Player 2: Demand (kWh) = 18.09, Cost Savings ($) = 0.70, Strategy = compete
Hour 10 - Renewable Generation: Solar (kWh) = 42.68, Wind (kWh) = 19.27
Hour 10 - Battery State of Charge (kWh): 6.02
Hour 10 - Total Cost Savings ($): 1.20
Hour 11 - Player 1: Demand (kWh) = 39.61, Cost Savings ($) = 0.90, Strategy = compete
Hour 11 - Player 2: Demand (kWh) = 16.54, Cost Savings ($) = 0.60, Strategy = compete
Hour 11 - Renewable Generation: Solar (kWh) = 46.65, Wind (kWh) = 11.14
Hour 11 - Battery State of Charge (kWh): 5.80
Hour 11 - Total Cost Savings ($): 1.50
Hour 12 - Player 1: Demand (kWh) = 34.99, Cost Savings ($) = 1.40, Strategy = cooperate
Hour 12 - Player 2: Demand (kWh) = 33.57, Cost Savings ($) = 1.30, Strategy = compete
Hour 12 - Renewable Generation: Solar (kWh) = 49.15, Wind (kWh) = 24.30
Hour 12 - Battery State of Charge (kWh): 7.19
Hour 12 - Total Cost Savings ($): 2.70
Hour 13 - Player 1: Demand (kWh) = 20.43, Cost Savings ($) = 0.40, Strategy = compete
Hour 13 - Player 2: Demand (kWh) = 25.41, Cost Savings ($) = 1.00, Strategy = compete
Hour 13 - Renewable Generation: Solar (kWh) = 50.00, Wind (kWh) = 5.68
Hour 13 - Battery State of Charge (kWh): 5.73
Hour 13 - Total Cost Savings ($): 1.40
Hour 14 - Player 1: Demand (kWh) = 27.55, Cost Savings ($) = 1.10, Strategy = cooperate
Hour 14 - Player 2: Demand (kWh) = 18.30, Cost Savings ($) = 0.70, Strategy = compete
Hour 14 - Renewable Generation: Solar (kWh) = 49.15, Wind (kWh) = 6.35
Hour 14 - Battery State of Charge (kWh): 5.57
Hour 14 - Total Cost Savings ($): 1.80
Hour 15 - Player 1: Demand (kWh) = 31.93, Cost Savings ($) = 1.30, Strategy = cooperate
Hour 15 - Player 2: Demand (kWh) = 25.67, Cost Savings ($) = 0.60, Strategy = cooperate
Hour 15 - Renewable Generation: Solar (kWh) = 46.65, Wind (kWh) = 22.06
Hour 15 - Battery State of Charge (kWh): 6.74
Hour 15 - Total Cost Savings ($): 1.90
Hour 16 - Player 1: Demand (kWh) = 32.24, Cost Savings ($) = 1.30, Strategy = cooperate
Hour 16 - Player 2: Demand (kWh) = 28.47, Cost Savings ($) = 0.60, Strategy = cooperate
Hour 16 - Renewable Generation: Solar (kWh) = 42.68, Wind (kWh) = 6.38
Hour 16 - Battery State of Charge (kWh): 5.09
Hour 16 - Total Cost Savings ($): 1.90
Hour 17 - Player 1: Demand (kWh) = 19.65, Cost Savings ($) = 1.40, Strategy = cooperate
Hour 17 - Player 2: Demand (kWh) = 28.45, Cost Savings ($) = 2.20, Strategy = compete
Hour 17 - Renewable Generation: Solar (kWh) = 37.50, Wind (kWh) = 3.73
Hour 17 - Battery State of Charge (kWh): 4.22
Hour 17 - Total Cost Savings ($): 3.60
Hour 18 - Player 1: Demand (kWh) = 28.72, Cost Savings ($) = 1.40, Strategy = compete
Hour 18 - Player 2: Demand (kWh) = 31.61, Cost Savings ($) = 2.60, Strategy = compete
Hour 18 - Renewable Generation: Solar (kWh) = 31.47, Wind (kWh) = 20.41
Hour 18 - Battery State of Charge (kWh): 5.09
Hour 18 - Total Cost Savings ($): 4.00
Hour 19 - Player 1: Demand (kWh) = 30.95, Cost Savings ($) = 2.40, Strategy = cooperate
Hour 19 - Player 2: Demand (kWh) = 26.24, Cost Savings ($) = 2.20, Strategy = compete
Hour 19 - Renewable Generation: Solar (kWh) = 25.00, Wind (kWh) = 25.97
Hour 19 - Battery State of Charge (kWh): 5.10
Hour 19 - Total Cost Savings ($): 4.60
Hour 20 - Player 1: Demand (kWh) = 18.60, Cost Savings ($) = 0.70, Strategy = cooperate
Hour 20 - Player 2: Demand (kWh) = 23.90, Cost Savings ($) = 0.90, Strategy = compete
Hour 20 - Renewable Generation: Solar (kWh) = 18.53, Wind (kWh) = 17.83
Hour 20 - Battery State of Charge (kWh): 3.78
Hour 20 - Total Cost Savings ($): 1.60
Hour 21 - Player 1: Demand (kWh) = 15.24, Cost Savings ($) = 0.60, Strategy = cooperate
Hour 21 - Player 2: Demand (kWh) = 16.40, Cost Savings ($) = 0.70, Strategy = compete
Hour 21 - Renewable Generation: Solar (kWh) = 12.50, Wind (kWh) = 23.05
Hour 21 - Battery State of Charge (kWh): 3.58
Hour 21 - Total Cost Savings ($): 1.30
Hour 22 - Player 1: Demand (kWh) = 18.77, Cost Savings ($) = 0.70, Strategy = cooperate
Hour 22 - Player 2: Demand (kWh) = 27.91, Cost Savings ($) = 0.60, Strategy = cooperate
Hour 22 - Renewable Generation: Solar (kWh) = 7.32, Wind (kWh) = 9.93
Hour 22 - Battery State of Charge (kWh): 1.91
Hour 22 - Total Cost Savings ($): 1.30
Hour 23 - Player 1: Demand (kWh) = 15.85, Cost Savings ($) = 0.60, Strategy = cooperate
Hour 23 - Player 2: Demand (kWh) = 18.54, Cost Savings ($) = 1.75, Strategy = cooperate
Hour 23 - Renewable Generation: Solar (kWh) = 3.35, Wind (kWh) = 7.51
Hour 23 - Battery State of Charge (kWh): 1.17
Hour 23 - Total Cost Savings ($): 2.35
Hour 24 - Player 1: Demand (kWh) = 22.03, Cost Savings ($) = 1.99, Strategy = cooperate
Hour 24 - Player 2: Demand (kWh) = 22.03, Cost Savings ($) = 1.87, Strategy = compete
Hour 24 - Renewable Generation: Solar (kWh) = 0.85, Wind (kWh) = 14.86
Hour 24 - Battery State of Charge (kWh): 1.53
Hour 24 - Total Cost Savings ($): 3.86

Process finished with exit code 0

部分代码:

# Plotting
plt.figure(figsize=(12, 16))

# Plot 1: Demand Response Strategies Over Time
plt.subplot(4, 2, 1)
for i, player in enumerate(players):
    plt.plot(time_steps, strategy_data[i], label=f'Player {player.id}')
plt.title('Demand Response Strategies Over Time')
plt.xlabel('Hour')
plt.ylabel('Cooperate (1) / Compete (0)')
plt.legend()


# Plot 2: Player 1 Electricity Demand Before Demand Response
plt.subplot(4, 2, 2)
plt.plot(time_steps, before_dr_demand_data[0], label=f'Player 1 - Before DR')
plt.plot(time_steps, after_dr_demand_data[0], linestyle='--', label='Player 1 - After DR')
plt.title('Player 1 Electricity Demand Before and After Demand Response')
plt.xlabel('Hour')
plt.ylabel('Demand (kWh)')
plt.legend()

# Plot 3: Player 2 Electricity Demand Before Demand Response
plt.subplot(4, 2, 3)
plt.plot(time_steps, before_dr_demand_data[1], label=f'Player 2 - Before DR')
plt.plot(time_steps, after_dr_demand_data[1], linestyle='--', label='Player 2 - After DR')
plt.title('Player 2 Electricity Demand Before and After Demand Response')
plt.xlabel('Hour')
plt.ylabel('Demand (kWh)')
plt.legend()

# Plot 4: Cumulative Cost Savings Over Time
plt.subplot(4, 2, 4)

# Calculate the total cost savings for both players
grand_total_cost_savings = np.sum(cumulative_cost_savings_data, axis=0)

# Plot the grand total cost savings with a dashed line
plt.plot(time_steps, grand_total_cost_savings, label='Grand Total')

plt.title('Cumulative Cost Savings Over Time')
plt.xlabel('Hour')
plt.ylabel('Cumulative Cost Savings ($)')
plt.legend()

# Plot 5: Renewable Energy Generation Over Time
plt.subplot(4, 2, 5)
plt.plot(time_steps, solar_generation_data, label='Solar')
plt.plot(time_steps, wind_generation_data, label='Wind')
plt.title('Renewable Energy Generation Over Time')
plt.xlabel('Hour')
plt.ylabel('Generation (kWh)')
plt.legend()


# Plot 6: Battery State of Charge Over Time
plt.subplot(4, 2, 6)
plt.plot(time_steps, battery_soc_data)
plt.title('Battery State of Charge Over Time')
plt.xlabel('Hour')
plt.ylabel('State of Charge (kWh)')
plt.show()

# Define the path for saving the figure in the 'Results' subfolder
save_path = "./results/combined_figures.png"
# Save the figure in the 'Results' subfolder
plt.savefig(os.path.join(save_path), bbox_inches='tight')

plt.tight_layout()

🎉3 参考文献

文章中一些内容引自网络,会注明出处或引用为参考文献,难免有未尽之处,如有不妥,请随时联系删除。

[1]张丹丹,童亦斌,金新民,等.计及需求响应的微电网储能优化配置[J].电力电子技术, 2016, 50(11):4.DOI:CNKI:SUN:DLDZ.0.2016-11-036.

[2]马瑞真,张新燕,章攀钊,等.计及需求响应与主从博弈的微电网低碳优化调度[J].现代电子技术, 2023, 46(7):121-127.

🌈4 Python代码实现

  • 3
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值