I am working on developing gearbox fault detection algorithm, for that I am working on generating gearbox simulation data.
I am referring this paper: https://www.sciencedirect.com/science/article/pii/S0022460X08002757
I have taken everything as 0 as initial condition. Here is my code:
def gear_equations(t, ti):
m1 = 0.96 # Mass of Pinion
m2 = 2.88 # Mass of Gear
Cr = 1.6456 # Contact Ration
Im = 0.0021 # Moment of Inertia of Motor
Ib = 0.0105 # Moment of Inertia of Load
I1 = 4.3659e-4 # Moment of Inertia of Pinion
I2 = 8.3602e-3 # Moment of Inertia of Gear
f1 = 30 # Input Shaft Frequency
fm = 570 # Gear Mesh Frequency
M1 = 11.9 # Input Motor Torque
M2 = 48.8 # Output Load Torque
kc = 4.4e4 # Total Stiffness of the Coupling
cc = 5.0e5 # Damping Coefficient of Coupling
kr = 6.56e7 # Radial Stiffness of the Bearing
cr = 1.8e5 # Damping Coefficient of the Coupling
Rb1 = 0.02834 # Base radius of Pinion
Rb2 = 0.07160 # Base radius of Gear
mu = 3.99e-6
#ct = mu*kt
cm = 3.533e3
km = 8.854e8
y1, y11, y2, y22, theta1, theta11, theta2, theta22, thetam, thetaM, thetab, thetaB = ti
k1, k2 = kr, kr
c1, c2 = cr, cr
kp, kg = kc, kc
cp, cg = cc, cc
dy1_dt = y11
dy2_dt = y22
dtheta1_dt = theta11
dtheta2_dt = theta22
dthetam_dt = thetaM
dthetab_dt = thetaB
Fk = km*(Rb1*theta1 - Rb2*theta2 - y1 + y2)
Fc = cm*(Rb1*theta11 - Rb2*theta22 - y11 + y22)
d2y1_dt2 = (Fk + Fc - k1*y1 - c1*y11)/m1
d2y2_dt2 = (Fk + Fc - k2*y2 - c2*y22)/m2
d2thetam_dt2 = (M1 - kp*(thetam - theta1) - cp*(thetaM - theta11))/Im
d2thetab_dt2 = (M2 - kg*(theta2 - thetab) - cg*(theta22 - thetaB))/Ib
d2theta1_dt2 = (kp*(thetam - theta1) + cp*(thetaM - theta11) - Rb1*(Fk + Fc))/I1
d2theta2_dt2 = (Rb2*(Fk + Fc) - cg*(theta22 - thetaB) - kg*(theta2 - thetab))/I2
return [dy1_dt, d2y1_dt2, dy2_dt, d2y2_dt2, dthetam_dt, d2thetam_dt2, dthetab_dt, d2thetab_dt2, dtheta1_dt, d2theta1_dt2, dtheta2_dt, d2theta2_dt2]
t0 = tuple([0]*12)
t = np.linspace(0, 10, int(8e4))
sol = solve_ivp(gear_equations, (0,10), t0, method="BDF", t_eval=t)
I am getting this warning: RuntimeWarning: overflow encountered in double_scalars d2theta1_dt2 = (kp*(thetam - theta1) + cp*(thetaM - theta11) - Rb1*(Fk + Fc))/I1 and then this error: ValueError: array must not contain infs or NaNs