当前位置:   article > 正文

利用CNN网络输电线路故障诊断(Python代码,TensorFlow框架,压缩包带有数据集和代码,解压缩可直接运行)_cnn 故障数据

cnn 故障数据

 效果视频:利用CNN网络输电线路故障诊断(Python代码,压缩包带有数据集和代码,解压缩可直接运行)_哔哩哔哩_bilibili

环境库要求:TensorFlow>=2.4.0版本以上即可 

1.数据集介绍 

将故障区分为具体的不同类型:单相短路故障、两相接地短路故障、两相相间故障、三相相间短路故障。这里随意举出每种类别的两个样本进行展示。

GCBAIaIbIcVaVbVc
1001-151.2918124-9.67745156385.800162260.400749853-0.132934945-0.267814907
1001-336.1861826-76.2832619518.328896580.312731934-0.123633156-0.189098779
1011-343.4870147104.56275133.7942853090.2720425010.011317575-0.283360076
1011-339.1254001105.4293167-0.2672412250.277820540.021756839-0.299577378
011019.38615173-785.553797768.7279081-0.210406869-0.00201120.212418069
011018.47841651-783.8619173767.9410527-0.217651204-0.002604510.220255714
0111506.5917463374.8825788-879.3449970.042029705-0.025636401-0.016393305
0111495.1384715387.4159615-880.42530960.042107683-0.025103056-0.017004627

2.模型:CNN网络,每类故障有1000个样本

3.效果(平均识别准确率为 98.053%)

混淆矩阵

 F1-score

4.对项目感兴趣的,可以关注最后一行

  1. import numpy as np
  2. import pandas as pd
  3. import matplotlib.pyplot as plt
  4. import seaborn as sns
  5. import warnings
  6. from sklearn.model_selection import train_test_split
  7. from sklearn.preprocessing import LabelEncoder
  8. from sklearn.neural_network import MLPClassifier
  9. from sklearn.metrics import accuracy_score, classification_report, confusion_matrix
  10. sns.set_style('darkgrid')
  11. plt.rcParams['figure.figsize'] = (13, 9)
  12. plt.rcParams['font.size'] = 20
  13. warnings.filterwarnings('ignore')
  14. plt.rcParams['font.family'] = 'SimHei' # 设置字体为黑体
  15. #代码和数据集的压缩包:https://mbd.pub/o/bread/ZJuXmZpp

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/煮酒与君饮/article/detail/776218
推荐阅读
相关标签
  

闽ICP备14008679号