基于机器学习和深度学习的NASA涡扇发动机剩余使用寿命预测(C-MAPSS数据集,Python代码,ipynb 文件)

以美国航空航天局提供的航空涡扇发动机退化数据集为研究对象,该数据集包含多台发动机从启动到失效期间多个运行周期的多源传感器时序状态监测数据,它们共同表征了发动机的性能退化情况。为减小计算成本,需要对原始多源传感器监测数据进行数据筛选,剔除与发动机性能退化情况无关的传感器数据项,保留有用数据,为对多源传感器数据进行有效甄别,考虑综合多种数据筛选方式,以保证筛选结果的准确性。

主要内容如下:

Data Visualization:

  1. Maximum life chart and engine life distribution chart for each unit.

  2. Correlation coefficient chart between sensors and RUL.

  3. Line chart showing the relationship between sensors and RUL for each engine.

  4. Value distribution chart for each sensor.

Feature Engineering:

  1. Based on the line chart showing the relationship between sensors and engine RUL, sensors 1, 5, 10, 16, 18, and 19 are found to be constant. Hence, these features are removed. Finally, the data is normalized.

Machine Learning Model:

  1. "Rolling mean feature" is added to the data, representing the average value of features over 10 time periods.

  2. Seven models are built: Linear regression, Light GBM, Random Forest, KNN, XGBoost, SVR, and Extra Tree.

  3. MAE, RMSE, and R2 are used as evaluation metrics. SVR performs the best with an R2 of 0.61 and RMSE = 25.7.

Deep Learning Model:

  1. The time window length is set to 30, and the shift length is set to 1. The training and test data are processed to be in a three-dimensional format for input to the models.

  2. Six deep learning models are built: CNN, LSTM, Stacked LSTM, Bi-LSTM, GRU, and a hybrid model combining CNN and LSTM.

  3. Convergence charts and evaluation of test data predictions are plotted. Each model has an R2 higher than 0.85, with Bi-LSTM achieving an R2 of 0.89 and RMSE of 13.5.

机器学习模型所用模块:

复制代码
import pandas as pdimport numpy as npimport matplotlib.pyplot as pltimport seaborn as snsimport randomimport warningswarnings.filterwarnings('ignore')
from sklearn.metrics import mean_squared_error, r2_score,mean_absolute_errorfrom sklearn.model_selection import train_test_splitfrom sklearn.preprocessing import StandardScaler,MinMaxScaler
from sklearn.linear_model import LinearRegressionfrom sklearn.svm import SVRfrom sklearn.ensemble import RandomForestRegressor,ExtraTreesRegressorfrom sklearn.neighbors import KNeighborsRegressorfrom xgboost import XGBRegressorfrom lightgbm import LGBMRegressor

结果如下:

深度学习所用模块:

python 复制代码
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
import random
import time
import warnings
warnings.filterwarnings('ignore')

from sklearn.metrics import mean_squared_error, r2_score, mean_absolute_error
from sklearn.model_selection import train_test_split
from sklearn.preprocessing import StandardScaler,MinMaxScaler
#from google.colab import drive
#drive.mount('/content/drive')

# model
import tensorflow as tf
from tensorflow import keras
from tensorflow.keras import layers
from tensorflow.keras.models import Sequential
from tensorflow.keras.layers import Dense, LSTM, Conv1D
from tensorflow.keras.layers import BatchNormalization, Dropout
from tensorflow.keras.layers import TimeDistributed, Flatten
from tensorflow.keras.layers.experimental import preprocessing
from tensorflow.keras.optimizers import Adam
完整代码可通过知乎学术咨询获得:https://www.zhihu.com/consult/people/792359672131756032?isMe=1
from tensorflow.keras.callbacks import ReduceLROnPlateau,EarlyStopping

完整代码可通过知乎学术咨询获得.

工学博士,担任《Mechanical System and Signal Processing》《中国电机工程学报》《控制与决策》等期刊审稿专家,擅长领域:现代信号处理,机器学习,深度学习,数字孪生,时间序列分析,设备缺陷检测、设备异常检测、设备智能故障诊断与健康管理PHM等。

相关推荐
kkkkk02110610 分钟前
【Rust创作】Rust 错误处理:从 panic 到优雅控制
开发语言·算法·rust
视***间10 分钟前
275TOPS算力边缘计算盒子的价值洞察与市场定位---视程空间
人工智能·边缘计算
AI模块工坊10 分钟前
AAAI 2025 | 即插即用,川大Mesorch刷新SOTA,用「介观」Transformer架构终结图像造假
人工智能·深度学习·计算机视觉·架构·transformer
周杰伦_Jay13 分钟前
【OpenManus深度解析】MetaGPT团队打造的开源AI智能体框架,打破Manus闭源壁垒。包括架构分层、关键技术特点等内容
人工智能·深度学习·opencv·架构·开源
John.Lewis19 分钟前
C++初阶(14)list
开发语言·c++·笔记
爱学习的小鱼gogo24 分钟前
pyhton 螺旋矩阵(指针-矩阵-中等)含源码(二十六)
python·算法·矩阵·指针·经验·二维数组·逆序
文火冰糖的硅基工坊28 分钟前
[嵌入式系统-146]:五次工业革命对应的机器人形态的演进、主要功能的演进以及操作系统的演进
前端·网络·人工智能·嵌入式硬件·机器人
猫头虎34 分钟前
openAI发布的AI浏览器:什么是Atlas?(含 ChatGPT 浏览功能)macOS 离线下载安装Atlas完整教程
人工智能·macos·chatgpt·langchain·prompt·aigc·agi
老六哥_AI助理指南39 分钟前
为什么AI会改变单片机的未来?
人工智能·单片机·嵌入式硬件
SEO_juper1 小时前
2026 AI可见性:构建未来-proof策略的顶级工具
人工智能·搜索引擎·百度·工具·数字营销