效果视频:利用CNN-Bigru-Attention模型输电线路故障诊断(Python代码,TensorFlow框架,压缩包带有数据集和代码,解压缩可直接运行)_哔哩哔哩_bilibili
售后包免费远程协助运行(用向日葵或者todesk软件协助)
比之前CNN模型准确率提高了1.3%左右:利用CNN网络输电线路故障诊断(Python代码,TensorFlow框架,压缩包带有数据集和代码,解压缩可直接运行)_cnn 故障数据-CSDN博客
1.数据集介绍 (matlab仿真模型获取数据)
将故障区分为具体的不同类型:单相短路故障、两相接地短路故障、两相相间故障、三相相间短路故障。这里随意举出每种类别的两个样本进行展示。
G | C | B | A | Ia | Ib | Ic | Va | Vb | Vc |
1 | 0 | 0 | 1 | -151.2918124 | -9.677451563 | 85.80016226 | 0.400749853 | -0.132934945 | -0.267814907 |
1 | 0 | 0 | 1 | -336.1861826 | -76.28326195 | 18.32889658 | 0.312731934 | -0.123633156 | -0.189098779 |
1 | 0 | 1 | 1 | -343.4870147 | 104.5627513 | 3.794285309 | 0.272042501 | 0.011317575 | -0.283360076 |
1 | 0 | 1 | 1 | -339.1254001 | 105.4293167 | -0.267241225 | 0.27782054 | 0.021756839 | -0.299577378 |
0 | 1 | 1 | 0 | 19.38615173 | -785.553797 | 768.7279081 | -0.210406869 | -0.0020112 | 0.212418069 |
0 | 1 | 1 | 0 | 18.47841651 | -783.8619173 | 767.9410527 | -0.217651204 | -0.00260451 | 0.220255714 |
0 | 1 | 1 | 1 | 506.5917463 | 374.8825788 | -879.344997 | 0.042029705 | -0.025636401 | -0.016393305 |
0 | 1 | 1 | 1 | 495.1384715 | 387.4159615 | -880.4253096 | 0.042107683 | -0.025103056 | -0.017004627 |
2.模型:CNN-Bigru-Attention模型,每类故障有1000个样本
3.效果(平均识别准确率为 99.31%)
混淆矩阵(以准确率形式呈现)
4.对项目感兴趣的,可以关注最后一行
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
import warningsfrom sklearn.model_selection import train_test_split
from sklearn.preprocessing import LabelEncoder
sns.set_style('darkgrid')
plt.rcParams['figure.figsize'] = (13, 9)
plt.rcParams['font.size'] = 20
warnings.filterwarnings('ignore')
plt.rcParams['font.family'] = 'SimHei' # 设置字体为黑体
#代码和数据集的压缩包:https://mbd.pub/o/bread/ZZ6amZ9t