Пример #1
0
def chlorinecompressor_motor_driven_end_horizontal_diagnosis(
        xdata: ndarray, ydata: ndarray, fs: int, R: ndarray,
        bearing_ratio: ndarray, th: ndarray):
    x = VibrationSignal(data=xdata, fs=fs, type=2)
    y = VibrationSignal(data=ydata, fs=fs, type=2)
    mp_instance = CP_Motor_Driven_Horizontal(x=x,
                                             y=y,
                                             r=R[0],
                                             bearing_ratio=bearing_ratio,
                                             ib_threshold=th[0:3],
                                             ma_threshold=th[3:6],
                                             bw_threshold=th[6:9],
                                             thd_threshold=th[9],
                                             pd_threshold=th[10] / 180.0 *
                                             np.pi,
                                             kurtosis_threshold=th[11])
    mp_instance.diagnosis()
    return mp_instance.fault_num, \
           np.vstack((mp_instance.x_vel.freq, mp_instance.x_vel.spec)), \
           np.vstack((mp_instance.x.freq, mp_instance.x.spec)), \
           np.vstack((mp_instance.x_env.freq, mp_instance.x_env.spec)), \
           np.hstack((0, mp_instance.x_vel.harmonics)), \
           abs(mp_instance.phase_diff) / np.pi * 180, \
           mp_instance.x_vel.thd, \
           mp_instance.x_env.bearing_amp, \
           mp_instance.x.kurtosis, \
           mp_instance.ma_indicator, \
           mp_instance.ib_indicator, \
           np.hstack((0, mp_instance.x_vel.harmonics_index)), \
           np.transpose(np.reshape(mp_instance.x_env.bearing_index,(4,3)))  , \
           {'unbalance': mp_instance.ib_threshold,
            'misalignment': mp_instance.ma_threshold,
            'bearing': mp_instance.bw_threshold,
            }
def chlorinecompressor_compressor_driven_end_horizontal(
    xdata: ndarray, ydata: ndarray, pressure: ndarray, fs: int, R: ndarray, th: ndarray
):
    x = VibrationSignal(data=xdata, fs=fs, type=2)
    y = VibrationSignal(data=ydata, fs=fs, type=2)
    mp_instance = CP_Compressor_Driven_Horizontal(
        x=x,
        y=y,
        r=R[1],
        pressure=pressure,
        ib_threshold=th[0:3],
        ma_threshold=th[3:6],
        wd_threshold=th[6:9],
        sg_threshold=th[9:12],
        pres_threshold=th[12:15],
        rb_threshold=th[15:18],
        thd_threshold=th[18],
        pd_threshold=th[19] / 180 * np.pi,
        harmonic_threshold=th[20:30],
        subharmonic_threshold=th[30:35],
    )
    mp_instance.diagnosis()
    return (
        mp_instance.fault_num,
        np.vstack((mp_instance.x_vel.freq, mp_instance.x_vel.spec)),
        np.vstack((mp_instance.x.freq, mp_instance.x.spec)),
        np.hstack((mp_instance.x_vel.sub_harmonics[0], mp_instance.x_vel.harmonics)),
        mp_instance.x_vel.sub_harmonics,
        mp_instance.lt_fr_amp.max(),
        abs(mp_instance.phase_diff) / np.pi * 180,
        mp_instance.x_vel.thd,
        mp_instance.harmonic_number,
        mp_instance.x.ow_amp,
        mp_instance.ma_indicator,
        mp_instance.ib_indicator,
        mp_instance.pres_std,
        mp_instance.sub_har_num,
        np.hstack(
            (
                mp_instance.x_vel.sub_harmonics_index[0],
                mp_instance.x_vel.harmonics_index,
            )
        ),
        mp_instance.x.ow_index,
        mp_instance.x_vel.sub_harmonics_index,
        mp_instance.sg_index,
        {
            "unbalance": mp_instance.ib_threshold,
            "misalignment": mp_instance.ma_threshold,
            "bearing": mp_instance.wd_threshold,
            "surge": mp_instance.sg_threshold,
            "rubbing": mp_instance.rb_threshold,
        },
    )
Пример #3
0
def chlorinecompressor_compressor_driven_end_vertical_diagnosis(
        xdata: ndarray, ydata: ndarray, pressure: ndarray, fs: int, R: ndarray,
        th: ndarray):
    x = VibrationSignal(data=xdata, fs=fs, type=2)
    y = VibrationSignal(data=ydata, fs=fs, type=2)
    mp_instance = CP_Compressor_Driven_Vertical(
        x=x,
        y=y,
        r=R[1],
        pressure=pressure,
        ib_threshold=th[0:3],
        ma_threshold=th[3:6],
        wd_threshold=th[6:9],
        al_threshold=th[9:12],
        bl_threshold=th[12:15],
        sg_threshold=th[15:18],
        pres_threshold=th[18:21],
        rb_threshold=th[21:24],
        thd_threshold=th[24],
        pd_threshold=th[25] / 180 * np.pi,
        harmonic_threshold=th[26:36],
        subharmonic_threshold=th[36:41],
    )
    mp_instance.diagnosis()
    return mp_instance.fault_num, \
           np.vstack((mp_instance.x_vel.freq, mp_instance.x_vel.spec)), \
           np.vstack((mp_instance.x.freq, mp_instance.x.spec)), \
           np.hstack((mp_instance.bl_indicator, mp_instance.x_vel.harmonics)), \
           mp_instance.x_vel.sub_harmonics, \
           mp_instance.lt_fr_amp.max(), \
           abs(mp_instance.phase_diff) / np.pi * 180, \
           mp_instance.x_vel.thd, \
           mp_instance.ma_indicator, \
           mp_instance.ib_indicator, \
           mp_instance.harmonic_number, \
           mp_instance.x.ow_amp, \
           mp_instance.pres_std, \
           mp_instance.sub_har_num, \
           np.hstack((mp_instance.x_vel.half_fr_indexes, mp_instance.x_vel.harmonics_index)), \
           mp_instance.x.ow_index, \
           mp_instance.x_vel.sub_harmonics_index, \
           mp_instance.sg_index, \
           {'unbalance': mp_instance.ib_threshold,
            'misalignment': mp_instance.ma_threshold,
            'bearing': mp_instance.wd_threshold,
            'atype_loosen': mp_instance.al_threshold,
            'btype_loosen': mp_instance.bl_threshold,
            'surge': mp_instance.sg_threshold,
            'rubbing': mp_instance.rb_threshold
            }
Пример #4
0
def chlorinecompressor_gearbox_outputshaft_horizontal(xdata: ndarray, teeth_num: ndarray,
                                                      fs: int, R: ndarray, th: ndarray):
    x = VibrationSignal(data=xdata, fs=fs, type=2)
    mp_instance = CP_Gearbox_Output_Horizontal(x=x, y=x, r=R[1], teeth_num=teeth_num,
                                               gf_threshold=th[0:3],
                                               ma_threshold=th[3:6],
                                               wd_threshold=th[6:9],
                                               kurtosis_threshold=th[9]
                                               )
    mp_instance.diagnosis()
    return mp_instance.fault_num, \
           np.vstack((mp_instance.x_lp.freq, mp_instance.x_lp.spec)), \
           np.vstack((mp_instance.x_hp.freq, mp_instance.x_hp.spec)), \
           mp_instance.ma_indicator, \
           np.hstack((0, mp_instance.x_lp.harmonics)), \
           mp_instance.x_lp.ow_amp, \
           mp_instance.gf_indicator, \
           mp_instance.x.kurtosis, \
           np.hstack((0, mp_instance.x_lp.harmonics_index)), \
           mp_instance.x_lp.ow_index, \
           mp_instance.x_hp.sideband_indexes, \
           {'gear': mp_instance.gf_threshold,
            'misalignment': mp_instance.ma_threshold,
            'bearing': mp_instance.wd_threshold,
            }
def chlorinecompressor_gearbox_inputshaft_vertical(xdata: ndarray, teeth_num: ndarray,
                                                   fs: int, R: ndarray, th: ndarray, ):
    x = VibrationSignal(data=xdata, fs=fs, type=2)
    mp_instance = CP_Gearbox_Input_Vertical(x=x, y=x, r=R[0], teeth_num=teeth_num,
                                            gf_threshold=th[0:3],
                                            ma_threshold=th[3:6],
                                            wd_threshold=th[6:9],
                                            al_threshold=th[9:12],
                                            bl_threshold=th[12:15],
                                            kurtosis_threshold=th[15],
                                            harmonic_threshold=th[16:26], )

    mp_instance.diagnosis()
    # return mp_instance
    return mp_instance.fault_num, \
           np.vstack((mp_instance.x_vel.freq, mp_instance.x_vel.spec)), \
           np.vstack((mp_instance.x_hp.freq, mp_instance.x_hp.spec)), \
           np.hstack((mp_instance.bl_indicator, mp_instance.x_vel.harmonics)), \
           mp_instance.x_vel.ow_amp, \
           mp_instance.gf_indicator, \
           mp_instance.x_hp.kurtosis, \
           mp_instance.harmonic_number, \
           mp_instance.ma_indicator, \
           np.hstack((mp_instance.x_vel.half_fr_indexes, mp_instance.x_vel.harmonics_index)), \
           mp_instance.x_vel.ow_index, \
           mp_instance.x_hp.sideband_indexes, \
           {'gear': mp_instance.gf_threshold,
            'misalignment': mp_instance.ma_threshold,
            'bearing': mp_instance.wd_threshold,
            'atype_loosen': mp_instance.al_threshold,
            'btype_loosen': mp_instance.bl_threshold
            }
Пример #6
0
    def surge_diagnosis(self, pressure_vector, diag_obj: VibrationSignal):
        low_index1, low_energy1 = diag_obj.get_band_energy(fr=self.fr,
                                                           band_range=(0, 0.4))
        low_index2, low_energy2 = diag_obj.get_band_energy(fr=self.fr,
                                                           band_range=(0.6,
                                                                       0.8))

        self.sg_index = np.array([low_index1, low_index2])
        self.lt_fr_amp = np.array([low_energy1, low_energy2])

        self.sg_indicator = 0.45 * low_energy1 + \
                            0.35 * low_energy2

        self.pres_std = np.std(pressure_vector, ddof=1)
        sg_level_vib = np.searchsorted(self.sg_threshold, self.sg_indicator)
        sg_level_pres = np.searchsorted(self.pres_threshold, self.pres_std)

        self.sg_level = np.max((sg_level_pres, sg_level_vib))
Пример #7
0
def prepolymerization_kettle_motor_driven_end_vertical(
        xdata: ndarray, ydata: ndarray, fs: int, R: float,
        bearing_ratio: ndarray, cur: ndarray, th1: ndarray, th2: ndarray):
    cur_mean = cur.mean()
    th = th1 if (cur_mean > 150) else th2

    x = VibrationSignal(data=xdata, fs=fs, type=2)
    y = VibrationSignal(data=ydata, fs=fs, type=2)

    mp_instance = BD_Motor_Driven_Vertical(x=x,
                                           y=y,
                                           r=R,
                                           bearing_ratio=bearing_ratio,
                                           ib_threshold=th[0:3],
                                           ma_threshold=th[3:6],
                                           bw_threshold=th[6:9],
                                           al_threshold=th[9:12],
                                           bl_threshold=th[12:15],
                                           thd_threshold=th[15],
                                           pd_threshold=th[16] / 180 * np.pi,
                                           kurtosis_threshold=th[17],
                                           harmonic_threshold=th[18:28])

    mp_instance.diagnosis()
    return mp_instance.fault_num, \
           np.vstack((mp_instance.x_vel.freq, mp_instance.x_vel.spec)), \
           np.vstack((mp_instance.x.freq, mp_instance.x.spec)), \
           np.vstack((mp_instance.x_env.freq, mp_instance.x_env.spec)), \
           np.hstack((mp_instance.bl_indicator, mp_instance.x_vel.harmonics)), \
           mp_instance.x_env.bearing_amp, \
           abs(mp_instance.phase_diff) / np.pi * 180, \
           mp_instance.x_vel.thd, \
           mp_instance.ma_indicator, \
           mp_instance.ib_indicator, \
           mp_instance.x.kurtosis, \
           mp_instance.harmonic_number, \
           np.hstack((mp_instance.x_vel.half_fr_indexes, mp_instance.x_vel.harmonics_index)), \
           np.transpose(np.reshape(mp_instance.x_env.bearing_index, (4, 3))), \
           {'unbalance': mp_instance.ib_threshold,
            'misalignment': mp_instance.ma_threshold,
            'bearing': mp_instance.bw_threshold,
            'atype_loosen': mp_instance.al_threshold,
            'btype_loosen': mp_instance.bl_threshold
            }
Пример #8
0
def prepolymerization_kettle_blender(
    xdata: ndarray,
    fs: int,
    R: float,
    bearing_ratio: ndarray,
    cur: ndarray,
    th1: ndarray,
    th2: ndarray,
    teeth_num: ndarray,
):
    cur_mean = cur.mean()
    th = th1 if (cur_mean > 150) else th2

    x = VibrationSignal(data=xdata, fs=fs, type=2)
    mp_instance = BD_Blender_Driven(
        x=x,
        y=x,
        r=R / teeth_num[2],
        bearing_ratio=bearing_ratio,
        teeth_num=teeth_num,
        ib_threshold=th[0:3],
        bw_threshold=th[3:6],
        al_threshold=th[6:9],
        bl_threshold=th[9:12],
        rb_threshold=th[12:15],
        kurtosis_threshold=th[15],
        thd_threshold=th[16],
        pd_threshold=th[17] / 180 * np.pi,
        harmonic_threshold=th[18:28],
        subharmonic_threshold=th[28:33],
    )
    mp_instance.diagnosis()
    return (
        mp_instance.fault_num,
        np.vstack((mp_instance.x_vel.freq, mp_instance.x_vel.spec)),
        np.vstack((mp_instance.x.freq, mp_instance.x.spec)),
        np.vstack((mp_instance.x_env.freq, mp_instance.x_env.spec)),
        np.hstack((mp_instance.bl_indicator, mp_instance.x_vel.harmonics)),
        mp_instance.x_vel.sub_harmonics,
        mp_instance.x_env.bearing_amp,
        mp_instance.x_vel.thd,
        mp_instance.ib_indicator,
        mp_instance.harmonic_number,
        mp_instance.sub_har_num,
        np.hstack((mp_instance.x_vel.half_fr_indexes,
                   mp_instance.x_vel.harmonics_index)),
        np.transpose(np.reshape(mp_instance.x_env.bearing_index, (4, 3))),
        mp_instance.x_vel.sub_harmonics_index,
        {
            "unbalance": mp_instance.ib_threshold,
            "bearing": mp_instance.bw_threshold,
            "atype_loosen": mp_instance.al_threshold,
            "btype_loosen": mp_instance.bl_threshold,
            "rubbing": mp_instance.rb_threshold,
        },
    )
def chlorinecompressor_compressor_nondriven_end_horizontal(xdata: ndarray, ydata: ndarray, pressure: ndarray,
                                                           fs: int, R: ndarray,
                                                           th: ndarray):
    x = VibrationSignal(data=xdata, fs=fs, type=2)
    y = VibrationSignal(data=ydata, fs=fs, type=2)
    mp_instance = CP_Compressor_NonDriven_Horizontal(x=x, y=y, r=R[1], pressure=pressure,
                                                     ib_threshold=th[0:3],
                                                     wd_threshold=th[3:6],
                                                     sg_threshold=th[6:9],
                                                     pres_threshold=th[9:12],
                                                     rb_threshold=th[12:15],
                                                     thd_threshold=th[15],
                                                     pd_threshold=th[16] / 180 * np.pi,
                                                     harmonic_threshold=th[17:27],
                                                     subharmonic_threshold=th[27:32],
                                                     )
    mp_instance.diagnosis()
    return mp_instance.fault_num, \
           np.vstack((mp_instance.x_vel.freq, mp_instance.x_vel.spec)), \
           np.vstack((mp_instance.x.freq, mp_instance.x.spec)), \
           np.hstack((mp_instance.x_vel.sub_harmonics[0], mp_instance.x_vel.harmonics)), \
           mp_instance.x_vel.sub_harmonics, \
           mp_instance.lt_fr_amp.max(), \
           abs(mp_instance.phase_diff) / np.pi * 180, \
           mp_instance.x_vel.thd, \
           mp_instance.harmonic_number, \
           mp_instance.x.ow_amp, \
           mp_instance.pres_std, \
           mp_instance.sub_har_num, \
           mp_instance.ib_indicator, \
           np.hstack((mp_instance.x_vel.sub_harmonics_index[0], mp_instance.x_vel.harmonics_index)), \
           mp_instance.x.ow_index, \
           mp_instance.x_vel.sub_harmonics_index, \
           mp_instance.sg_index, \
           {'unbalance': mp_instance.ib_threshold,
            'bearing': mp_instance.wd_threshold,
            'surge': mp_instance.sg_threshold,
            'rubbing': mp_instance.rb_threshold
            }
def chlorinecompressor_motor_nondriven_end_vertical_diagnosis(
        xdata: ndarray, ydata: ndarray, fs: int, R: ndarray,
        bearing_ratio: ndarray, th: ndarray):
    x = VibrationSignal(data=xdata, fs=fs, type=2)
    y = VibrationSignal(data=ydata, fs=fs, type=2)
    mp_instance = CP_Motor_NonDriven_Vertical(
        x=x,
        y=y,
        r=R[0],
        bearing_ratio=bearing_ratio,
        ib_threshold=th[0:3],
        bw_threshold=th[3:6],
        al_threshold=th[6:9],
        bl_threshold=th[9:12],
        thd_threshold=th[12],
        pd_threshold=th[13] / 180.0 * np.pi,
        kurtosis_threshold=th[14],
        harmonic_threshold=th[15:25],
    )
    mp_instance.diagnosis()
    return mp_instance.fault_num, \
           np.vstack((mp_instance.x_vel.freq, mp_instance.x_vel.spec)), \
           np.vstack((mp_instance.x.freq, mp_instance.x.spec)), \
           np.vstack((mp_instance.x_env.freq, mp_instance.x_env.spec)), \
           np.hstack((mp_instance.bl_indicator, mp_instance.x_vel.harmonics)), \
           mp_instance.x_env.bearing_amp, \
           abs(mp_instance.phase_diff) / np.pi * 180, \
           mp_instance.x_vel.thd, \
           mp_instance.x.kurtosis, \
           mp_instance.harmonic_number, \
           mp_instance.ib_indicator, \
           np.hstack((mp_instance.x_vel.half_fr_indexes, mp_instance.x_vel.harmonics_index)), \
           np.transpose(np.reshape(mp_instance.x_env.bearing_index, (4, 3))), \
           {'unbalance': mp_instance.ib_threshold,
            'bearing': mp_instance.bw_threshold,
            'atype_loosen': mp_instance.al_threshold,
            'btype_loosen': mp_instance.bl_threshold
            }
def prepolymerization_kettle_gearbox_inputshaft(
    xdata: ndarray,
    teeth_num: ndarray,
    fs: int,
    R: float,
    bearing_ratio: ndarray,
    cur: ndarray,
    th1: ndarray,
    th2: ndarray,
):
    cur_mean = cur.mean()

    th = th1 if (cur_mean > 150) else th2

    x = VibrationSignal(data=xdata, fs=fs, type=2)

    mp_instance = BD_Gearbox_Input(x=x,
                                   y=x,
                                   r=R,
                                   teeth_num=teeth_num,
                                   bearing_ratio=bearing_ratio,
                                   gf_threshold=th[0:3],
                                   ma_threshold=th[3:6],
                                   bw_threshold=th[6:9],
                                   al_threshold=th[9:12],
                                   bl_threshold=th[12:15],
                                   kurtosis_threshold=th[15],
                                   harmonic_threshold=th[16:26])
    mp_instance.diagnosis()
    return mp_instance.fault_num, \
           np.vstack((mp_instance.x_vel.freq, mp_instance.x_vel.spec)), \
           np.vstack((mp_instance.x.freq, mp_instance.x.spec)), \
           np.vstack((mp_instance.x_env.freq, mp_instance.x_env.spec)), \
           np.hstack((mp_instance.bl_indicator, mp_instance.x_vel.harmonics)), \
           mp_instance.x_env.bearing_amp, \
           mp_instance.gf_indicator, \
           mp_instance.x.kurtosis, \
           mp_instance.harmonic_number, \
           mp_instance.ma_indicator, \
           np.hstack((mp_instance.x_vel.half_fr_indexes, mp_instance.x_vel.harmonics_index)), \
           np.transpose(np.reshape(mp_instance.x_env.bearing_index, (4, 3))), \
           mp_instance.x.sideband_indexes, \
           {'gear': mp_instance.gf_threshold,
            'misalignment': mp_instance.ma_threshold,
            'bearing': mp_instance.bw_threshold,
            'atype_loosen': mp_instance.al_threshold,
            'btype_loosen': mp_instance.bl_threshold
            }
Пример #12
0
def chlorinecompressor_gearbox_innerring(xdata: ndarray, teeth_num: ndarray,
                                         fs: int, R: ndarray, th: ndarray):
    x = VibrationSignal(data=xdata, fs=fs, type=2)
    mp_instance = CP_Gearbox_Inner_Ring(x=x,
                                        y=x,
                                        r=R[0],
                                        teeth_num=teeth_num,
                                        gf_threshold=th[0:3],
                                        kurtosis_threshold=th[3])
    mp_instance.diagnosis()
    return mp_instance.fault_num, \
           np.vstack((mp_instance.x_hp.freq, mp_instance.x_hp.spec)), \
           mp_instance.gf_indicator, \
           mp_instance.x_hp.kurtosis, \
           mp_instance.x_hp.sideband_indexes, \
           {'gear': mp_instance.gf_threshold,
            }
Пример #13
0
def chlorinecompressor_compressor_nondriven_end_axial(xdata: ndarray,
                                                      fs: int, R: ndarray, th: ndarray):
    x = VibrationSignal(data=xdata, fs=fs, type=2)
    mp_instance = CP_Compressor_NonDriven_Axial(x=x, y=x, r=R[1],
                                                wd_threshold=th[0:3],
                                                rb_threshold=th[3:6],
                                                harmonic_threshold=th[6:16],
                                                subharmonic_threshold=th[16:21])
    mp_instance.diagnosis()
    return mp_instance.fault_num, \
           np.vstack((mp_instance.x_vel.freq, mp_instance.x_vel.spec)), \
           np.vstack((mp_instance.x.freq, mp_instance.x.spec)), \
           np.hstack((0, mp_instance.x_vel.harmonics)), \
           mp_instance.x_vel.sub_harmonics, \
           mp_instance.sub_har_num, \
           mp_instance.harmonic_number, \
           mp_instance.x.ow_amp, \
           np.hstack((0, mp_instance.x_vel.harmonics_index)), \
           mp_instance.x.ow_index, \
           mp_instance.x_vel.sub_harmonics_index, \
           {'bearing': mp_instance.wd_threshold,
            'rubbing': mp_instance.rb_threshold
            }