0% found this document useful (0 votes)
6 views2 pages

Program2 V

Uploaded by

khairepranav124
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)
6 views2 pages

Program2 V

Uploaded by

khairepranav124
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

4/8/26, 7:14 PM program2 v

In [1]: import numpy as np


import pandas as pd
import [Link] as plt
from [Link] import fft, fftfreq
import os
path = [Link]([Link]("~"), "Desktop", "roll no 61", "engine_failu
df = pd.read_csv(path)
print([Link]())
x = df.select_dtypes(include='number').iloc[:,0].values
fs = 1000
t = [Link](len(x))/fs
N = len(x)
f = fftfreq(N,1/fs)[:N//2]
F = lambda s: 2/N*[Link](fft(s)[:N//2])
u = x + 0.5*[Link](2*[Link]*25*t) # Unbalanced
m = x + 0.7*[Link](2*[Link]*100*t) # Misaligned
[Link](figsize=(9,6))
[Link](3,1,1); [Link](t[:500],x[:500]); [Link]("Time Domain"); [Link]()
[Link](3,1,2); [Link](f[:200],F(x)[:200]); [Link]("Frequency Spectrum");
[Link](3,1,3)
[Link](f[:200],F(x)[:200],label="Healthy")
[Link](f[:200],F(u)[:200],label="Unbalanced")
[Link](f[:200],F(m)[:200],label="Misaligned")
[Link](); [Link]("Spectrum Comparison"); [Link]()
plt.tight_layout(); [Link]()
rms = [Link]([Link](x**2))
cond = "HEALTHY" if rms<0.5 else "UNBALANCED" if rms<1 else "MISALIGNED / FAULTY"
print("\nVIBRATION ANALYSIS RESULT")
print("RMS Value:",round(rms,4))
print("Engine Condition:",cond)

Time_Stamp Temperature (°C) RPM Fuel_Efficiency \


0 2024-12-24 10:00:00 60.308585 3426.827588 20.445472
1 2024-12-24 10:05:00 112.705055 2949.758424 23.083947
2 2024-12-24 10:10:00 108.670976 1817.971040 20.555326
3 2024-12-24 10:15:00 107.114691 2730.660539 23.226431
4 2024-12-24 10:20:00 118.075814 1854.488677 21.148226

Vibration_X Vibration_Y Vibration_Z Torque Power_Output (kW) \


0 0.874657 0.005686 0.529798 107.877659 23.367684
1 0.696461 0.391779 0.124336 60.351655 57.941022
2 0.495276 0.189714 0.886417 110.986564 47.732998
3 0.986206 0.983202 0.468114 77.416793 44.112039
4 0.710810 0.101139 0.481034 100.475881 80.681972

Fault_Condition Operational_Mode
0 2 Idle
1 3 Cruising
2 2 Cruising
3 2 Cruising
4 2 Cruising

[Link] 1/2
4/8/26, 7:14 PM program2 v

VIBRATION ANALYSIS RESULT


RMS Value: 92.1329
Engine Condition: MISALIGNED / FAULTY

In [ ]: Name:- shete vivek


Roll No:-432

[Link] 2/2

You might also like