# 微电网经济优化运行（光伏、储能、柴油机）（Matlab代码实现）

## 📚2 运行结果

%光伏约束功率
for t=1:TN
C=[C,
0 <= P_pv(t)/Y_pv <= Ppvmax(t),
0 <= P_pv(t) <= P_inv
];
end
%储能约束功率&SOC
for t=1:TN
C = [C,
0 <= P_pqf(t) <= P_pcs*sign_pqf(t),
0 <= P_pqc(t) <= P_pcs*sign_pqc(t),
0 <= P_vff(t) <= P_pcs*sign_vff(t),
0 <= P_vfc(t) <= P_pcs*sign_vfc(t),
sign_pqf(t) + sign_pqc(t) <= 1,
sign_vff(t) + sign_vfc(t) <= 1,
SOC_min_pq <= SOC_pq(t) <= SOC_max_pq,
SOC_min_vf <= SOC_vf(t) <= SOC_max_vf
];
end
C = [C,
SOC_0_pq*0.9 <= SOC_pq(TN) <= SOC_0_pq*1.1,
SOC_0_vf*0.9 <= SOC_vf(TN) <= SOC_0_vf*1.1
];
%储能SOC计算
C = [C,
SOC_pq(1) == SOC_0_pq + P_pqc(1)*Y_besc/Qbat_pq - P_pqf(1)/Y_besf/Qbat_pq,
SOC_vf(1) == SOC_0_vf + P_vfc(1)*Y_besc/Qbat_vf - P_vff(1)/Y_besf/Qbat_vf
];
for t = 2:TN
C = [C,
SOC_pq(t) == SOC_pq(t-1) + P_pqc(t)*Y_besc/Qbat_pq - P_pqf(t)/Y_besf/Qbat_pq,
SOC_vf(t) == SOC_vf(t-1) + P_vfc(t)*Y_besc/Qbat_vf - P_vff(t)/Y_besf/Qbat_vf
];
end
%柴油约束功率&启停
for t=1:TN
C=[C,
OnOff(t)*P_dgmin <= P_dg(t) <= OnOff(t)*P_dgmax,
consequtiveON([OnOff_history OnOff],On_min),
consequtiveON(1-[OnOff_history OnOff],Off_min)
];
end
%爬坡速度
C = [C,
V_dgdown*(N/60) <=  P_dg(1)-P_dg_0 <= V_dgup*(N/60)
];
for t = 2:TN

## 🎉3 参考文献

[1]张国平,王维俊,毛龙波,米红菊.微电网经济运行优化方法研究综述[J].电力与能源,2019,40(05):585-590.

## 🌈4 Matlab代码及文章讲解

|
2月前

95 1
|
2月前
|

38 1
|
2月前
|

42 1
|
2月前
|

45 1
|
2月前
|

58 0
|
2月前
|

Matlab|面向低碳经济运行目标的多微网能量互联优化调度
Matlab|面向低碳经济运行目标的多微网能量互联优化调度
26 0
|
2月前

25 0
|
2月前
|

30 0
|
2月前
|

35 0
|
2月前
|

114 1