旋转机械的阶次分析的步骤和python代码案例
旋转机械的阶次分析步骤: 1.获取旋转机械的运行数据,包括振动加速度、转速等。 2.对振动加速度信号进行FFT变换,得到频域信号。 3.根据转速和齿轮传动比计算出各个阶次的频率。 4.在频域信号中找出每个阶次对应的频率分量。 5.计算每个阶次的振幅和相位,进行可视化或进一步分析。
Python代码案例: 1.导入所需模块
import numpy as np
import matplotlib.pyplot as plt
from scipy import signal
2.读取数据文件
data = np.loadtxt('vibration_data.txt')
time = data[:, 0]
acc = data[:, 1]
3.进行FFT变换
fs = 1 / np.mean(np.diff(time))
f, Pxx = signal.periodogram(acc, fs)
4.计算各个阶次的频率
gear_ratio = 2.5
rpm = 3000
fund_freq = rpm / 60
order_freq = np.arange(1, 11) * fund_freq * gear_ratio
5.在频域信号中找出每个阶次对应的频率分量
order_idx = np.zeros_like(order_freq, dtype=int)
for i, freq in enumerate(order_freq):
order_idx[i] = np.argmin(np.abs(f - freq))
6.计算每个阶次的振幅和相位
order_amp = np.sqrt(Pxx[order_idx])
order_phase = np.angle(Pxx[order_idx])
7.可视化结果
plt.plot(order_freq, order_amp, 'o-')
plt.xlabel('Order Frequency (Hz)')
plt.ylabel('Amplitude (m/s^2)')
plt.show()
``
原文地址: https://www.cveoy.top/t/topic/cuq4 著作权归作者所有。请勿转载和采集!