Optimal Power Flow Calculation Based on a Trustworthy Deep Neural Network
Ran Qingyue1, Lin Wei2, Yang Zhifang1, Yu Juan1
1. State Key Laboratory of Power Transmission Equipment Technology Chongqing University Chongqing 400044 China; 2. Department of Electrical and Electronic Engineering The Hong Kong Polytechnic University HKSAR 999077 China
Abstract:To conduct the optimal power flow (OPF) for resource allocation and system analysis within small time resolutions in renewable power systems, deep neural network-based (DNN-based) optimal power flow calculation methods have gained much attention. Nevertheless, since DNNs possess a black-box nature, the existing methods generally rely on limited training and testing sets for DNNs in the training and evaluation process. This makes difficulties in theoretically quantifying computational errors, and lacks the theoretical support for their trustworthiness. Consequently, this paper proposes an optimal power flow calculation method based on a trustworthy DNN. First, this paper focuses on the theoretical quantitative evaluation of mapping errors in DNNs and introduces a trustworthy DNN training model based on a bi-level min-max programming problem, enabling a training process with trustworthiness quantifications. Furthermore, based on the KKT conditions and the analytical representation of activation functions, this paper explicitly reformulates the proposed model as a bi-level programming problem by introducing integer variables, followed by developing an exact solution strategy based on Danskin's theorem. Moreover, this paper proposes a fast approximate solution strategy using convex relaxation and pattern recognition to alleviate the computational burden of integer variables. Numerical experiments in a 4-bus test system showcase: (1) Compared with existing methods, the proposed trustworthy DNN training model solved by our exact solution strategy can more accurately quantify the trustworthiness of DNNs. The mapping error evaluated based on a limited testing set (in existing methods) is smaller than that based on the proposed trustworthy DNN model (in the proposed method), even if the sample number in the testing set has been set to 1×104. (2) The mapping error of DNNs which are trained based on existing methods can reach up to 0.022 0(pu), while the mapping error of the proposed method is only 0.001 9(pu). Numerical experiments in the IEEE 118-bus system further verify: (1) Compared with existing methods, the average maximum mapping error of generation levels can decrease from 0.502 6(pu) to 0.120 5(pu) once the proposed trustworthy DNN training model and our solved by our fast approximate solution strategy with convex relaxation. (2) When pattern recognition is additionally added in our fast approximate solution strategy, the average maximum mapping error can decrease to 0.062 8(pu). Compared with the exact solution strategy which cannot complete one solution iteration within 1 440 minutes, the computational time of our fast approximate solution strategy with convex relaxation and pattern recognition can decrease to 25 minutes. These observations indicate the synergic combination of the proposed trustworthy DNN training model and the fast approximation solution strategy can contribute to improving the trustworthiness of a DNN with improved computational efficiency. The following conclusions can be drawn from this paper: (1) The proposed trustworthy DNN training model can theoretically quantify the computational performance of DNNs. This distinguishes us from existing methods, which quantify the computational performance of DNNs using limited testing sets, by paving a promising way for precise quantification of the trustworthiness for DNN-based OPF calculations. Furthermore, the proposed model can be exactly solved using our gradient-descent method based on Danskin's theorem. (2) Our fast approximate solution strategy, which considers convex relaxation and pattern recognition, can alleviate the computational burden of integer variables involved in our previous exact solution strategy, while still maintaining the direction of updating DNN parameters toward improved trustworthiness.
冉晴月, 林伟, 杨知方, 余娟. 基于可信深度神经网络的最优潮流计算方法[J]. 电工技术学报, 2024, 39(21): 6687-6699.
Ran Qingyue, Lin Wei, Yang Zhifang, Yu Juan. Optimal Power Flow Calculation Based on a Trustworthy Deep Neural Network. Transactions of China Electrotechnical Society, 2024, 39(21): 6687-6699.
[1] 习近平. 决胜全面建成小康社会夺取新时代中国特色社会主义伟大胜利——在中国共产党第十九次全国代表大会上的报告[EB/OL]. (2017-10-18) [2023-08-03]. https://www.gov.cn/zhuanti/2017-10/27/content_5234876.htm. [2] 秦博宇, 周星月, 丁涛, 等. 全球碳市场发展现状综述及中国碳市场建设展望[J]. 电力系统自动化, 2022, 46(21): 186-199. Qin Boyu, Zhou Xingyue, Ding Tao, et al.Review on development of global carbon market and prospect of China's carbon market construction[J]. Automation of Electric Power Systems, 2022, 46(21): 186-199. [3] International Energy Agency. An energy sector roadmap to carbon neutrality in China[R/OL]. (2021-09-01)[2023-08-03]. https://iea.blob.core.windows.net/assets/9448bd6e-670e-4cfd-953c-32e822a80f77/AnenergysectorroadmaptocarbonneutralityinChina.pdf. [4] 李军徽, 邵岩, 朱星旭, 等. 计及碳排放量约束的多区域互联电力系统分布式低碳经济调度[J]. 电工技术学报, 2023, 38(17): 4715-4728. Li Junhui, Shao Yan, Zhu Xingxu, et al.Carbon emissions constraint distributed low-carbon economic dispatch of power system[J]. Transactions of China Electrotechnical Society, 2023, 38(17): 4715-4728. [5] 张沈习, 王丹阳, 程浩忠, 等. 双碳目标下低碳综合能源系统规划关键技术及挑战[J]. 电力系统自动化, 2022, 46(8): 189-207. Zhang Shenxi, Wang Danyang, Cheng Haozhong, et al.Key technologies and challenges of low-carbon integrated energy system planning for carbon emission peak and carbon neutrality[J]. Automation of Electric Power Systems, 2022, 46(8): 189-207. [6] 吴孟雪, 房方. 计及风光不确定性的电-热-氢综合能源系统分布鲁棒优化[J]. 电工技术学报, 2023, 38(13): 3473-3485. Wu Mengxue, Fang Fang.Distributionally robust optimization of electricity-heat-hydrogen integrated energy system with wind and solar uncertainties[J]. Transactions of China Electrotechnical Society, 2023, 38(13): 3473-3485. [7] 中华人民共和国中央人民政府. 中共中央国务院关于完整准确全面贯彻新发展理念做好碳达峰碳中和工作的意见[EB/OL]. (2021-10-24)[2023-08-03]. https://www.gov.cn/zhengce/2021-10/24/content_5644613.htm. [8] Wu Jianghua, Luh P B, Chen Yonghong, et al.Synergistic integration of machine learning and mathematical optimization for unit commitment[J]. IEEE Transactions on Power Systems, 2023: 1-10. [9] 韩丽, 王冲, 于晓娇, 等. 考虑风电爬坡灵活调节的碳捕集电厂低碳经济调度[J]. 电工技术学报, 2024, 39(7): 2033-2045. Han Li, Wang Chong, Yu Xiaojiao, et al.Low-carbon and economic dispatch considering the carbon capture power plants with flexible adjustment of wind power ramp[J]. Transactions of China Electrotechnical Society, 2024, 39(7): 2033-2045. [10] Zhang Yijian, Dall'Anese E, Hong Mingyi. Dynamic ADMM for real-time optimal power flow[C]//2017 IEEE Global Conference on Signal and Information Processing (GlobalSIP), Montreal, QC, 2017: 1085-1089. [11] Bagen B, Bhavaraju M, Choi J, et al.Composite power system reliability[R]. IEEE Power and Energy Society, 2022. [12] 张伯明, 陈寿孙. 高等电力网络分析[M]. 北京: 清华大学出版社, 1996. [13] Sun D, Ashley B, Brewer B, et al. Optimal power flow by Newton approach[J]. IEEE Transactions on Power Apparatus and Systems, 1984, PAS-103(10): 2864-2880. [14] Jabr R A, Coonick A H, Cory B J.A primal-dual interior point method for optimal power flow dispatching[J]. IEEE Transactions on Power Systems, 2002, 17(3): 654-662. [15] Huang Shengjun, Dinavahi V.Fast batched solution for real-time optimal power flow with penetration of renewable energy[J]. IEEE Access, 2018, 6: 13898-13910. [16] Yang Yan, Yu Juan, Yang Zhifang, et al.A trustable data-driven framework for composite system reliability evaluation[J]. IEEE Systems Journal, 2022, 16(4): 6697-6707. [17] 余娟, 杨燕, 杨知方, 等. 基于深度学习的概率能量流快速计算方法[J]. 中国电机工程学报, 2019, 39(1): 22-30, 317. Yu Juan, Yang Yan, Yang Zhifang, et al.Fast probabilistic energy flow analysis based on deep learning[J]. Proceedings of the CSEE, 2019, 39(1): 22-30, 317. [18] Pan Xiang, Zhao Tianyu, Chen Minghua.DeepOPF: deep neural network for DC optimal power flow[C]// 2019 IEEE International Conference on Communications, Control, and Computing Technologies for Smart Grids, Beijing, China, 2019: 1-6. [19] 武新章, 郭苏杭, 代伟, 等. 基于特征降维与分块的输电网概率最优潮流深度学习方法[J]. 电力自动化设备, 2023, 43(8): 174-180. Wu Xinzhang, Guo Suhang, Dai Wei, et al.Feature dimension reduction and partitioning based deep learning method for probabilistic optimal power flow of transmission network[J]. Electric Power Automation Equipment, 2023, 43(8): 174-180. [20] Park S, Chen Wenbo, Mak T W K, et al. Compact optimization learning for AC optimal power flow[J]. IEEE Transactions on Power Systems, 2024, 39(2): 4350-4359. [21] Singh M, Kekatos V, Giannakis G.Learning to solve the AC-OPF using sensitivity-informed deep neural networks[C]//2022 IEEE Power & Energy Society General Meeting (PESGM), Denver, CO, USA, 2022: 1. [22] Kim M, Kim H.Projection-aware deep neural network for DC optimal power flow without constraint violations[C]//2022 IEEE International Conference on Communications, Control, and Computing Technologies for Smart Grids, Singapore, Singapore, 2022: 116-121. [23] Fioretto F, Mak T W K, van Hentenryck P. Predicting AC optimal power flows: combining deep learning and Lagrangian dual methods[C]//Proceedings of the AAAI Conference on Artificial Intelligence, New York, USA, 2020: 630-637. [24] Huang Wanjun, Pan Xiang, Chen Minghua, et al.DeepOPF-V: solving AC-OPF problems efficiently[J]. IEEE Transactions on Power Systems, 2022, 37(1): 800-803. [25] Li Yuxuan, Zhao Chaoyue, Liu Chenang.Solving non-linear optimization problem in engineering by model-informed generative adversarial network (MI-GAN)[C]//2022 IEEE International Conference on Data Mining Workshops (ICDMW), Orlando, FL, USA, 2022: 198-205. [26] Wang Junfei, Srikantha P.Fast optimal power flow with guarantees via an unsupervised generative model[J]. IEEE Transactions on Power Systems, 2023, 38(5): 4593-4604. [27] 杨东升, 吉明佳, 周博文, 等. 基于双生成器生成对抗网络的电力系统暂态稳定评估方法[J]. 电网技术, 2021, 45(8): 2934-2945. Yang Dongsheng, Ji Mingjia, Zhou Bowen, et al.Transient stability assessment of power system based on DGL-GAN[J]. Power System Technology, 2021, 45(8): 2934-2945. [28] 杨剑锋, 秦钟, 庞小龙, 等. 基于深度学习网络的输电线路异物入侵监测和识别方法[J]. 电力系统保护与控制, 2021, 49(4): 37-44. Yang Jianfeng, Qin Zhong, Pang Xiaolong, et al.Foreign body intrusion monitoring and recognition method based on Dense-YOLOv3 deep learning network[J]. Power System Protection and Control, 2021, 49(4): 37-44. [29] 朱永利, 张翼, 蔡炜豪, 等. 基于辅助分类-边界平衡生成式对抗网络的局部放电数据增强与多源放电识别[J]. 中国电机工程学报, 2021, 41(14): 5044-5053. Zhu Yongli, Zhang Yi, Cai Weihao, et al.Data augmentation and pattern recognition for multi-sources partial discharge based on boundary equilibrium generative adversarial network with auxiliary classifier[J]. Proceedings of the CSEE, 2021, 41(14): 5044-5053. [30] Yang Yafei, Wu Lei.Machine learning approaches to the unit commitment problem: current trends, emerging challenges, and new strategies[J]. The Electricity Journal, 2021, 34(1): 106889. [31] Chen Yize, Tan Yushi, Deka D.Is machine learning in power systems vulnerable?[C]//2018 IEEE International Conference on Communications, Control, and Computing Technologies for Smart Grids, Aalborg, Denmark, 2018: 1-6. [32] Lin Wei, Yang Zhifang, Yu Juan, et al.Toward fast calculation of probabilistic optimal power flow[J]. IEEE Transactions on Power Systems, 2019, 34(4): 3286-3288. [33] 刘承锡, 徐慎凯, 赖秋频. 基于全纯嵌入法的非迭代电力系统最优潮流计算[J]. 电工技术学报, 2023, 38(11): 2870-2882. Liu Chengxi, Xu Shenkai, Lai Qiupin.Non-iterative optimal power flow calculation based on holomorphic embedding method[J]. Transactions of China Electrotechnical Society, 2023, 38(11): 2870-2882. [34] Krizhevsky A, Sutskever I, Hinton G E.ImageNet classification with deep convolutional neural networks[J]. Communications of the ACM, 2017, 60(6): 84-90. [35] Lin Wei, Chen Yue, Li Qifeng, et al.An AC-feasible linear model in distribution networks with energy storage[J]. IEEE Transactions on Power Systems, 2024, 39(1): 1224-1239. [36] 袁亚湘, 孙文瑜. 最优化理论与方法[M]. 北京: 科学出版社, 1997. [37] Lin Wei, Yang Zhifang, Yu Juan, et al.Transmission expansion planning with feasible region of hydrogen production from water electrolysis[J]. IEEE Transactions on Industry Applications, 2022, 58(2): 2863-2874. [38] Danskin J M.The Theory of Max-Min and Its Application to Weapons Allocation Problems[M]. Berlin: Springer, 1967. [39] (美)伊恩·古德费洛, (加)约书亚·本吉奥, (加)亚伦·库维尔. 深度学习[M]. 赵申剑, 黎彧君, 符天凡, 等, 译. 北京: 人民邮电出版社, 2017. [40] 张林, 杨高峰, 汪洋, 等. 基于多参数规划理论的互联电网直流联络线功率可行域确定方法[J]. 中国电机工程学报, 2019, 39(19): 5763-5771, 5904. Zhang Lin, Yang Gaofeng, Wang Yang, et al.Determination of the DC tie-line transfer capacity region of the interconnected power grid: a multi-parametric programming approach[J]. Proceedings of the CSEE, 2019, 39(19): 5763-5771, 5904. [41] Paszke A, Gross S, Massa F, et al.PyTorch: an imperative style, high-performance deep learning library[C]//Proceedings of the 33rd International Conference on Neural Information Processing Systems, Vancouver, Canada, 2019: 8026-8037. [42] Hart W E, Watson J P, Woodruff D L.Pyomo: modeling and solving mathematical programs in Python[J]. Mathematical Programming Computation, 2011, 3(3): 219-260. [43] Gwyneth Butera. Getting started with Gurobi optimizer[EB/OL]. (2023-08-03)[2023-08-03]. https://support.gurobi.com/hc/en-us/articles/14799677517585. [44] Lin Wei. SystemParameters_NN_OPF[EB/OL]. (2023-05-11)[2023-08-03]. https://figshare.com/articles/dataset/SystemParameters_NN_OPF/22799744.