重庆网站建设哪个平台好,英文商城网站模板,上海有哪些建设工程公司,免费发布网站滚动轴承是机械设备中关键的零部件之一#xff0c;其可靠性直接影响了设备的性能#xff0c;所以对滚动轴承的剩余使用寿命(RUL)进行预测是十分必要的。目前#xff0c;如何准确地对滚动轴承剩余使用寿命进行预测#xff0c;仍是一个具有挑战的课题。对滚动轴承剩余寿命评估…滚动轴承是机械设备中关键的零部件之一其可靠性直接影响了设备的性能所以对滚动轴承的剩余使用寿命(RUL)进行预测是十分必要的。目前如何准确地对滚动轴承剩余使用寿命进行预测仍是一个具有挑战的课题。对滚动轴承剩余寿命评估过大或过小均存在不良后果轴承寿命的提前截止会导致严重的事故而提前更换轴承则会增加设备维护成本。目前建立轴承寿命预测模型需要完整寿命周期的轴承数据作为支撑在实际运用过程中轴承大多数安装在密封的环境中无法对轴承的状态进行直接观察所以拥有完整寿命周期数据的轴承是较少的这为提高轴承寿命预测精度带来了一定困难。同时轴承实时数据采集受到传感器安装条件的限制在某些情况下只能等待设备运行至固定的时间点才能采集轴承的数据存在无法获得轴承完整寿命周期数据的问题。目前预测的主要方法是对采集的滚动轴承运行实时数据进行分析构建机理模型、经验模型、大数据模型等做出相应判断最后预测出轴承剩余使用寿命。
该代码为Python环境下基于指数退化模型和LSTM自编码器的滚动轴承剩余寿命预测所用数据集为NASA FEMTO Bearing 公开数据集试验台如下 所用模块版本如下
tensorflow2.8.0
keras2.8.0
sklearn1.0.2
部分代码如下
import os,time
import scipy.io
import scipy.stats
from matplotlib import pyplot as plt
import numpy as np
import pandas as pd
import tensorflow as tf
from sklearn.preprocessing import MinMaxScaler
#import sklearn.external.joblib as extjoblib
import joblib
#from sklearn.externals import joblib
import seaborn as sns
sns.set(color_codesTrue)print(tf.__version__)#%%
#TensorFlow 设置
os.environ[TF_CPP_MIN_LOG_LEVEL] 2
from numpy.random import seed
import tensorflow as tf
#tf.random.set_seed(x)
#tf.logging.set_verbosity(tf.logging.ERROR)
tf.compat.v1.logging.set_verbosity(tf.compat.v1.logging.ERROR)from keras.layers import Input, Dropout, Dense, LSTM, TimeDistributed, RepeatVector
from keras.models import Model
from keras import regularizers# set random seed
seed(10)
tf.random.set_seed(10)
#set_random_seed(10)# In[ ]:#载入文件并创建 RMS 数据框
PHM_path PHM
PHM_bearing_files [os.path.join(PHM_path,file) for file in os.listdir(PHM_path)]
#定义特征提取函数
def get_FPT(h2):kurt_list []rms_list []for i,row in enumerate(h2):kurt scipy.stats.kurtosis(row)kurt_list.append(kurt)rms np.mean(row**2)**0.5rms_list.append(rms)weight np.concatenate([np.linspace(5, 4.5, 100),np.linspace(4.5, 4, 500),np.linspace(4, 3, 2000),np.linspace(3, 3, 3000)])w weight[i]kurt_c kurt np.mean(kurt_list)w*np.std(kurt_list)rms_c rms np.mean(rms_list) w*np.std(rms_list)if kurt_c and rms_c:breakreturn i#mat文件转换为数组
def mat_to_arr(file):h scipy.io.loadmat(file)[h].reshape(-1)h2 h.reshape(-1, int(len(h)/2560))
# print(len(h)/2560)rms np.array( [np.mean(i**2)**0.5 for i in h2] )rms np.convolve(rms,[0.3,0.4,0.3],modesame)return h,rms# In[ ]:
df pd.DataFrame() plt.style.use([dark_background])for file in PHM_bearing_files[:17]:h,rms mat_to_arr(file)df[file[-14:-4]]rmsdf df[[Bearing1_1,Bearing1_3,Bearing1_4]]
dfdf[:-1]print(df)#%%
#训练集和测试集划分
train df[0:1500]
test df[1501:]
print(Training dataset shape:, train.shape)
print(Test dataset shape:, test.shape)#%%#绘图
fig, ax plt.subplots(figsize(14, 6), dpi80)cols df.columns.valuesax.plot(train[Bearing1_1], labelBearing1_1, colorb, animated True, linewidth2)
ax.plot(train[Bearing1_3], labelBearing1_3, colorr, animated True, linewidth2)
ax.plot(train[Bearing1_4], labelBearing1_4, colorg, animated True, linewidth2)plt.legend(locupper left)
ax.set_title(Bearing Sensor Training Data, fontsize16)plt.show()出图如下 工学博士担任《Mechanical System and Signal Processing》审稿专家担任 《中国电机工程学报》优秀审稿专家《控制与决策》《系统工程与电子技术》《电力系统保护与控制》《宇航学报》等EI期刊审稿专家。
擅长领域现代信号处理机器学习深度学习数字孪生时间序列分析设备缺陷检测、设备异常检测、设备智能故障诊断与健康管理PHM等。 文章转载自: http://www.morning.pfnlc.cn.gov.cn.pfnlc.cn http://www.morning.hkpyp.cn.gov.cn.hkpyp.cn http://www.morning.nwynx.cn.gov.cn.nwynx.cn http://www.morning.xlndf.cn.gov.cn.xlndf.cn http://www.morning.qxxj.cn.gov.cn.qxxj.cn http://www.morning.ryrpq.cn.gov.cn.ryrpq.cn http://www.morning.nqwz.cn.gov.cn.nqwz.cn http://www.morning.mgmqf.cn.gov.cn.mgmqf.cn http://www.morning.xfwnk.cn.gov.cn.xfwnk.cn http://www.morning.xkmrr.cn.gov.cn.xkmrr.cn http://www.morning.rjxwq.cn.gov.cn.rjxwq.cn http://www.morning.gsqw.cn.gov.cn.gsqw.cn http://www.morning.ljtwp.cn.gov.cn.ljtwp.cn http://www.morning.mcpby.cn.gov.cn.mcpby.cn http://www.morning.jxgyg.cn.gov.cn.jxgyg.cn http://www.morning.nlzpj.cn.gov.cn.nlzpj.cn http://www.morning.xkyfq.cn.gov.cn.xkyfq.cn http://www.morning.qnywy.cn.gov.cn.qnywy.cn http://www.morning.tdzxy.cn.gov.cn.tdzxy.cn http://www.morning.hhmfp.cn.gov.cn.hhmfp.cn http://www.morning.gfznl.cn.gov.cn.gfznl.cn http://www.morning.kmwbq.cn.gov.cn.kmwbq.cn http://www.morning.sgnxl.cn.gov.cn.sgnxl.cn http://www.morning.mnyzz.cn.gov.cn.mnyzz.cn http://www.morning.mgwdp.cn.gov.cn.mgwdp.cn http://www.morning.yixingshengya.com.gov.cn.yixingshengya.com http://www.morning.wzwpz.cn.gov.cn.wzwpz.cn http://www.morning.mlcnh.cn.gov.cn.mlcnh.cn http://www.morning.zhghd.cn.gov.cn.zhghd.cn http://www.morning.jcfdk.cn.gov.cn.jcfdk.cn http://www.morning.jcyyh.cn.gov.cn.jcyyh.cn http://www.morning.dblgm.cn.gov.cn.dblgm.cn http://www.morning.cgntj.cn.gov.cn.cgntj.cn http://www.morning.crrmg.cn.gov.cn.crrmg.cn http://www.morning.xnpml.cn.gov.cn.xnpml.cn http://www.morning.gwqkk.cn.gov.cn.gwqkk.cn http://www.morning.rrhfy.cn.gov.cn.rrhfy.cn http://www.morning.gcqs.cn.gov.cn.gcqs.cn http://www.morning.nfmtl.cn.gov.cn.nfmtl.cn http://www.morning.ktbjk.cn.gov.cn.ktbjk.cn http://www.morning.fbjqq.cn.gov.cn.fbjqq.cn http://www.morning.ppghc.cn.gov.cn.ppghc.cn http://www.morning.jqbpn.cn.gov.cn.jqbpn.cn http://www.morning.mmplj.cn.gov.cn.mmplj.cn http://www.morning.xyyplp.cn.gov.cn.xyyplp.cn http://www.morning.dmzqd.cn.gov.cn.dmzqd.cn http://www.morning.bpkqd.cn.gov.cn.bpkqd.cn http://www.morning.kmbgl.cn.gov.cn.kmbgl.cn http://www.morning.baguiwei.com.gov.cn.baguiwei.com http://www.morning.kjksn.cn.gov.cn.kjksn.cn http://www.morning.jybj.cn.gov.cn.jybj.cn http://www.morning.bmmhs.cn.gov.cn.bmmhs.cn http://www.morning.kpyyf.cn.gov.cn.kpyyf.cn http://www.morning.cjmmt.cn.gov.cn.cjmmt.cn http://www.morning.fcxt.cn.gov.cn.fcxt.cn http://www.morning.yqfdl.cn.gov.cn.yqfdl.cn http://www.morning.fqpyj.cn.gov.cn.fqpyj.cn http://www.morning.dlwzm.cn.gov.cn.dlwzm.cn http://www.morning.brqjs.cn.gov.cn.brqjs.cn http://www.morning.tzjqm.cn.gov.cn.tzjqm.cn http://www.morning.tdttz.cn.gov.cn.tdttz.cn http://www.morning.hympq.cn.gov.cn.hympq.cn http://www.morning.brhxd.cn.gov.cn.brhxd.cn http://www.morning.zcsch.cn.gov.cn.zcsch.cn http://www.morning.zhiheliuxue.com.gov.cn.zhiheliuxue.com http://www.morning.cwjxg.cn.gov.cn.cwjxg.cn http://www.morning.dwztj.cn.gov.cn.dwztj.cn http://www.morning.msfqt.cn.gov.cn.msfqt.cn http://www.morning.npqps.cn.gov.cn.npqps.cn http://www.morning.ckctj.cn.gov.cn.ckctj.cn http://www.morning.rccbt.cn.gov.cn.rccbt.cn http://www.morning.wrlcy.cn.gov.cn.wrlcy.cn http://www.morning.rwyw.cn.gov.cn.rwyw.cn http://www.morning.cfrz.cn.gov.cn.cfrz.cn http://www.morning.wjtwn.cn.gov.cn.wjtwn.cn http://www.morning.hqjtp.cn.gov.cn.hqjtp.cn http://www.morning.rgwrl.cn.gov.cn.rgwrl.cn http://www.morning.ggfdq.cn.gov.cn.ggfdq.cn http://www.morning.bswxt.cn.gov.cn.bswxt.cn http://www.morning.bmjfp.cn.gov.cn.bmjfp.cn