Page 33 - 电力与能源2023年第三期
P. 33
第 44 卷 第 3 期 电力与能源
2023 年 6 月 227
DOI:10.11973/dlyny202303006
基于 STM32 的异常用电行为检测算法研究
黄 根,徐爱蓉,孙成刚,李建宁
(国网上海市电力公司青浦供电公司,上海 201799)
摘 要:电力企业用电异常检测算法的初始数据完整性较差,很难保证异常分类结果的准确性。针对异常用
电检测准确率较低、检测精度有待提高等问题,提出了一种基于 STM32 的异常用电行为检测算法。首先,基
于 STM32 提取电力异常数据特征,划分电力负荷数据结构,填充缺失、错误的电力数据,保证企业用电数据
的完整性,建立电力数据异常分类模型;其次,将电力数据的异常分为线损异常、交流电压异常和交流电流异
常,分别对 3 类不同的电力数据异常情况进行分析,获取异常检测阈值,并提出相应的电力企业异常用电检测
算法。以上海某区域实际电力用户的用电数据为例,对 3 种常用检测算法和基于 STM32 的检测算法在不同
聚类簇数监测点下的接受者操作特征(ROC)曲线下面积(AUC)进行比较,试验结果验证了所提算法的准确
性和有效性。该算法可为电力企业快速排查用电异常行为提供依据。
关键词:电力企业;异常用电检测;数据完整性
作者简介:黄 根(1990—),女,硕士,工程师,主要从事配电网运行、电力营销技术、用电监察等工作。
中图分类号:TN06 文献标志码:A 文章编号:2095-1256(2023)03-0227-06
Research on Abnormal Power Consumption Behavior Detection Algorithm
Based on STM32
HUANG Gen,XU Airong,SUN Chenggang,LI Jianning
(State Grid Qingpu Power Supply Company,SMEPC,Shanghai 201799,China)
Abstract:For the abnormal power consumption of electric power enterprises,the initial data integrity of the de⁃
tection algorithm is poor,so it is difficult to ensure the accuracy of the classification results. In order to solve the
problems of low accuracy and improve the effectiveness of abnormal power consumption electricity detection,an
algorithm based on STM32 is proposed for abnormal detection in power enterprises. Firstly,based on STM32,
abnormal data features are extracted,power load data structures are divided,missing and wrong power data are
filled in,and the integrity of enterprise power data is ensured. Thereby,Power data anomaly classification model
is established. Secondly,the power data anomalies are divided into line loss anomalies,AC voltage anomalies,
AC current anomalies. Three different power data anomalies are analyzed,abnormal detection thresholds are ob⁃
tained,and the corresponding abnormal power consumption detection algorithm is proposed. Taking the power
based consumption data of actual power users in a region of Shanghai as an example,the area under receiver oper⁃
ating characteristic (ROC) curves (AVC) of the detection algorithm based STM32 was compared to those of other
three commonly used detection algorithms under different cluster number monitoring points. The test results have
verified the accuracy and effectiveness of the proposed algorithm,and can provide a basis for power enterprises to
quickly detect power abnormal behaviors.
Key words:electric power enterprises,abnormal power consumption detection,data integrity
近年来,我国工商业发展迅速,城市化水平不 电力用户提供更优质的服务。
断提高,人们的工作生活与社会生产均离不开电 在电力企业自身的不断发展中,仍然存在某
能,于是电力用户量迅速扩大。随着能源互联网 些不足之处,例如电力用户电量数据异常问题没
的推进发展,电网公司的信息化程度越来越高,用 有得到有效解决。若不及时处理用户电量数据异
电侧电量数据相当庞大。因此,电力企业需要不 常情况,可能会给供电企业或电力用户带来一些
断提高工作效率和管理效能,才能更好地为广大 不必要的经济损失。因此,如何从庞大的电力企

