0% found this document useful (0 votes)
34 views10 pages

Matlab La-2

Uploaded by

amoghak369
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views10 pages

Matlab La-2

Uploaded by

amoghak369
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

MATLAB LA-2 REPORT


on

Predictive Maintenance System Using MATLAB

Submitted in partial fulfilment of the requirement for the award of Degree of

Bachelor of Engineering
in

Computer Science and Engineering Submitted by:


Nivedita G 1NT21CS121
K Bhagavathi Naidu 1NT21CS077
Amogha K 1NT21CS210

Under the Guidance of


Dr. Vasanthakumar G U
Associate Prof. , Dept. of CS&E, NMIT

Department of Computer Science and Engineering


(Accredited by NBA Tier-1)

2024-2025
NITTE MEENAKSHI INSTITUTE OF TECHNOLOGY
(AN AUTONOMOUS INSTITUTION, AFFILIATED TO VISVESVARAYA TECHNOLOGICAL UNIVERSITY, BELGAUM
, APPROVED BY AICTE & GOVT.OF KARNATAKA)

Department of Computer Science and Engineering


(Accredited by NBA Tier-1)

CERTIFICATE

This is to certify that the MATLAB LA-2 is an authentic work carried out by Nivedita G
(1NT21CS121),K Bhagavathi Naidu(1NT21CS077) and Amogha K (1NT21CS210) bonafide
students of Nitte Meenakshi Institute of Technology, Bangalore in partial fulfilment for the award of
the degree of Bachelor of Engineering in COMPUTER SCIENCE AND ENGINEERING of
Visvesvaraya Technological University, Belagavi during the academic year 2024-25. It is certified that
all corrections and suggestions indicated during the internal assessment has been incorporated in the
report. This project has been approved as it satisfies the academic requirement in respect of project work
presented for the said degree.

Subject Guide

Dr. Vasanthakumar G U
Associate Prof , Dept. CSE,
NMIT Bangalore
Predictive Maintenance System Using MATLAB
• Problem: Develop a system to predict industrial equipment failures in advance using
sensor data and machine learning, reducing downtime and maintenance costs.

• Tasks:

o Simulate real-time sensor data. o Analyze and preprocess the

data. o Predict health status using machine learning algorithms.

o Visualize sensor data and health status in an intuitive dashboard.


• Use Case: Industrial IoT (IIoT) applications for monitoring and maintaining equipment
health.
• MATLAB Tools: Machine learning toolbox, data visualization, and statistical feature
extraction.
The project implements machine learning classifiers like SVM to categorize equipment health
status (e.g., Healthy, Maintenance Required, Failure). It visualizes real-time data and
predictions, aiding proactive maintenance and operational efficiency.

1. Introduction
Predictive maintenance is a cutting-edge methodology used in industrial settings to predict
equipment failures before they occur. By analyzing real-time sensor data and employing
advanced algorithms, companies can schedule maintenance activities proactively, reducing
downtime and costs.
This project demonstrates the creation of a predictive maintenance system for industrial
equipment, focusing on data visualization and health status prediction using MATLAB. The
system is designed to process sensor data, detect anomalies, and visualize equipment health in
an intuitive manner.

2. Objectives
• To process and analyze sensor data from industrial equipment.

• To predict maintenance requirements using machine learning.

• To create visually appealing and detailed dashboards for data insights.


3. Tools and Technologies
• Software: MATLAB R2023b

• Programming Language: MATLAB


• Algorithms Used: Classification algorithms for health status prediction (e.g., SVM,
kNN).

• Visualization: Interactive dashboards with time-series and health status plots.

4. System Architecture
1. Data Acquisition: Simulated real-time sensor data.

2. Preprocessing: Data cleaning and normalization.

3. Feature Extraction: Deriving statistical features such as mean, standard deviation, and
kurtosis.

4. Machine Learning: Training a classifier to predict equipment health status (Healthy,


Maintenance Required, Failure).

5. Visualization: Displaying dashboards and plots for monitoring and analysis.

5. Code Implementation
Below is the complete MATLAB code for the predictive maintenance system.

% Predictive Maintenance System using MATLAB

% Author: Amogha K, Nivedita G, K Bhagavathi Naidu

% Date: [Today's Date] clc;

clear; close all;

%% Step 1: Simulate Sensor Data disp('Step

1: Simulating Sensor Data...'); time =

0:0.1:100; % Time vector (seconds)

num_sensors = 3; % Number of sensors (e.g., Temperature, Vibration, Pressure)


% Generate random sensor data with anomalies temperature =

60 + 5*sin(0.1*time) + 2*randn(size(time)); vibration = 0.5 +

0.1*sin(0.5*time) + 0.05*randn(size(time)); pressure = 100 +

10*sin(0.05*time) + 5*randn(size(time));

% Introduce anomalies (e.g., vibration spikes and temperature surges) temperature(400:450)

= temperature(400:450) + 20; % Overheat anomaly vibration(600:620) = vibration(600:620)

+ 0.5; % Vibration anomaly

% Combine data

sensor_data = [temperature', vibration', pressure'];

% Plot raw sensor data figure;

subplot(3,1,1); plot(time, temperature, 'r'); title('Temperature Sensor'); xlabel('Time (s)');


ylabel('°C');
subplot(3,1,2); plot(time, vibration, 'g'); title('Vibration Sensor'); xlabel('Time (s)');
ylabel('gforce');

subplot(3,1,3); plot(time, pressure, 'b'); title('Pressure Sensor'); xlabel('Time (s)'); ylabel('kPa');

disp('Sensor Data Simulated.');

%% Step 2: Feature Engineering disp('Step

2: Extracting Features...');

window_size = 100; % Moving window size for feature extraction features

= []; labels = []; % Initialize features and labels

for i = 1:window_size:length(time)-window_size

window_data = sensor_data(i:i+window_size-1, :);

% Compute mean and variance for each sensor

mean_vals = mean(window_data); var_vals =


var(window_data); % Combine features features

= [features; mean_vals, var_vals];

% Assign labels (1: Healthy, 2: Maintenance Required, 3: Failure Likely)

if i >= 400 && i <= 450 labels = [labels;

3]; % Failure elseif i >= 600 && i <= 620

labels = [labels; 2]; % Maintenance Required

else labels = [labels; 1]; %

Healthy end end

disp('Features Extracted.');

%% Step 3: Train Predictive Model disp('Step

3: Training Predictive Model...');

% Train a classification model


mdl = fitctree(features, labels, 'PredictorNames', {'MeanTemp', 'MeanVib', 'MeanPres',
'VarTemp', 'VarVib', 'VarPres'}, ...

'ResponseName', 'HealthStatus'); disp('Model

Trained.');

%% Step 4: Visualization of Model and Predictions

disp('Step 4: Visualizing Results...'); % Predict on

the entire dataset predicted_labels = predict(mdl,

features);

% Plot original vs predicted health status figure;

subplot(2,1,1); plot(1:length(labels), labels, 'bo-',

'LineWidth', 1.5); hold on; title('Original Health Status');

xlabel('Window Index'); ylabel('Health Status');


yticks([1 2 3]); yticklabels({'Healthy', 'Maintenance', 'Failure'}); grid

on;

subplot(2,1,2); plot(1:length(predicted_labels), predicted_labels, 'ro-',

'LineWidth', 1.5); hold on; title('Predicted Health Status');

xlabel('Window Index'); ylabel('Health Status');

yticks([1 2 3]); yticklabels({'Healthy', 'Maintenance', 'Failure'}); grid

on;

%% Step 5: Build GUI for Interactivity (Optional) disp('Step

5: Building GUI...');

app = uifigure('Name', 'Predictive Maintenance Dashboard');

ax = uiaxes('Parent', app, 'Position', [50 50 700 400]); plot(ax,

time, temperature, 'r'); hold on;

plot(ax, time, vibration, 'g'); plot(ax, time, pressure, 'b');

title(ax, 'Sensor Data'); xlabel(ax, 'Time (s)'); ylabel(ax, 'Sensor Values');

legend(ax, 'Temperature', 'Vibration', 'Pressure'); grid on;

disp('Predictive Maintenance System Completed.');


6. Results and Discussion
The system generates a multi-plot dashboard with:

1. Time-series sensor data for monitoring trends.

2. A stem plot showing the original health status of equipment.

3. A stem plot for the predicted health status based on the machine learning classifier.The
model accurately predicts equipment health based on the input features, showcasing the
effectiveness of predictive maintenance techniques.
7. Future Improvements
• Data Integration: Include real-world sensor data from Hitachi Industrial Equipment
Systems.
• Feature Engineering: Explore advanced features like FFT and wavelet transforms for
better predictions.
• Cloud Integration: Connect the system to cloud platforms for real-time data processing
and alert generation.
• GUI Development: Develop an interactive GUI using MATLAB App Designer for a
more user-friendly experience.

8. Conclusion
This predictive maintenance system demonstrates the potential of MATLAB for industrial IoT
applications. By employing machine learning and data visualization, businesses can enhance
equipment reliability and operational efficiency.

Appendix: Project Files

• Project.m: MATLAB script containing the complete code.

• Predictive_Maintenance_Dashboard.png: Image file of the visualization.

References
1. MATLAB Documentation: https://www.mathworks.com

You might also like