# Autoencoder-based anomaly detection for sensor data using MATLAB
[![View Autoencoder-based anomaly detection for sensor data on File Exchange](https://www.mathworks.com/matlabcentral/images/matlab-file-exchange.svg)](https://www.mathworks.com/matlabcentral/fileexchange/77554-autoencoder-based-anomaly-detection-for-sensor-data)
This demo highlights how one can use a semi-supervised machine learning technique based on autoencoder to detect an anomaly in sensor data (output pressure of a triplex pump). The demo also shows how a trained autoencoder can be deployed on an embedded system through automatic code generation. The advantage of autoencoders is that they can be trained to detect anomalies with data representing normal operation, i.e. you don't need data from failures.
# Autoencoder basics
Autoencoders are based on neural networks, and the network consists of two parts: an encoder and a decoder. Encoder compresses the N-dimensional input (e.g. a frame of sensor data) into an x-dimensional code (where x < N), which contains most of the information carried in the input, but with fewer data. Hence, the encoder is somewhat similar to principal component analysis, but autoencoders can capture non-linear relationships. The decoder, on the other hand, tries to regenerate the input from the lower-dimensional code or latent representation.
The way one can use trained autoencoders for anomaly detection is that in normal conditions, when normal data is fed into the network, the network can regenerate the input, and the error between the input and output is small. When data containing anomalies is fed into the network, the network fails to regenerate the input, and the error becomes larger.
![Autoencoder schema](https://upload.wikimedia.org/wikipedia/commons/thumb/3/37/Autoencoder_schema.png/220px-Autoencoder_schema.png)
# How to run
Open the AnomalyDetectionDemo.mlx in MATLAB
# Toolboxes required
This demo uses Deep Learning toolbox to train the model. To generate C code from the trained model, you need MATLAB Coder toolbox.
算法如诗
- 粉丝: 2487
- 资源: 61
最新资源
- 几何物体检测44-YOLO(v5至v11)、COCO、CreateML、Paligemma、TFRecord、VOC数据集合集.rar
- 几何物体检测43-YOLO(v5至v9)、COCO、CreateML、Paligemma、TFRecord、VOC数据集合集.rar
- 基于cruise的燃料电池功率跟随仿真,按照丰田氢能源车型搭建,在wltc工况下跟随效果好,最高车速175,最大爬坡30,百公里9s均已实现 1.模型通过cruise simulink联合仿真,策略
- C#源码 上位机 联合Visionpro 通用框架开发源码,已应用于多个项目,整套设备程序,可以根据需求编出来,具体Vpp功能自己编 程序包含功能 1.自动设置界面窗体个数及分布 2.照方式以命令触
- 程序名称:悬架设计计算程序 开发平台:基于matlab平台 计算内容:悬架偏频刚度挠度;螺旋弹簧,多片簧,少片簧,稳定杆,减震器的匹配计算;悬架垂向纵向侧向力学、纵倾、侧倾校核等;独立悬架杠杆比,等效
- 华为OD+真题及解析+智能驾驶
- jQuery信息提示插件
- 基于stm32的通信系统,sim800c与服务器通信,无线通信监测,远程定位,服务器通信系统,gps,sim800c,心率,温度,stm32 由STM32F103ZET6单片机核心板电路、DS18B2
- 充电器检测9-YOLO(v5至v11)、COCO、Create充电器检测9L、Paligemma、TFRecord、VOC数据集合集.rar
- 华为OD+考试真题+实现过程
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈