Skip to content

tbigru

The TBiGRU approach uses a feature selection mechanism to mine transferable features and a bearing running state detection to determine the first-time-to-predict. The training is done with an MMD approach.

The feature selection uses a distance measure based on Dynamic Time Warping and the Wasserstein distance. From a set of 30 common vibration features the ones with the smallest distance between source and target domain are selected. These features serve as inputs to the network.

The first-time-to-predict (FTTP) is used to generate the RUL labels for training. FTTP is the time step where the degradation can be detected for the first time. The RUL labels before this time step should be constant. The TBiGRU approach uses the moving average correlation (MAC) of the energy entropies of four levels of maximal overlap discrete wavelet transform (MODWT) decompositions to determine four running states of each bearing. The end of the steady running state marks the FTTP.

TBiGRU was introduced by Cao et al. and evaluated on the FEMTO Bearing dataset.

VibrationFeatureExtractor

This class extracts 30 different features from a raw acceleration signal.

The features are: RMS, kurtosis, peak2peak, standard deviation, skewness, margin factor, impulse factor, energy, median absolute, gini factor, maximum absolute, mean absolute, energies of the 16 bands resulting from wavelet packet decomposition, standard deviation of arccosh and arcsinh. If the input has n features, n*30 features are extracted. Additionally, it features a scaler that can be fit to scale all extracted features between [0, 1].

__call__(features, targets)

Extract the features from the input and optionally scale them.

The features should have the shape [num_windows, window_size, num_input_features] and the targets [num_windows].

Parameters:

Name Type Description Default
features ndarray

The input features.

required
targets ndarray

The input targets.

required

Returns:

Type Description
Tuple[ndarray, ndarray]

The extracted features and input targets.

__init__(num_input_features, feature_idx=None)

Create a new vibration feature extractor with the selected features.

The features are sorted as f1_1, .., f1_j, ..., fi_j, where i is the index of the computed feature (between 0 and 30) and j is the index of the raw feature (between 0 and num_input_features).

Parameters:

Name Type Description Default
num_input_features int

The number of input features.

required
feature_idx Optional[List[int]]

The indices of the features to compute.

None

fit(features)

Fit the internal scaler on a list of raw feature time series.

The time series are passed through the feature extractor and then used to fit the internal min-max scaler. Each time series in the list should have the shape [num_windows, window_size, num_input_features].

Parameters:

Name Type Description Default
features List[ndarray]

The list of raw feature time series.

required

Returns:

Type Description
VibrationFeatureExtractor

The feature extractor itself.

mac(inputs, window_size, wavelet='dmey')

Calculate the moving average correlation (MAC) of the energy entropies of four levels of maximal overlap discrete wavelet transform (MODWT) decompositions.

The wavelet is a wavelet description that can be passed to pywt. The default wavelet was confirmed by the original authors. For more options call pywt.wavelist. The input signal should have the shape [num_windows, window_size, num_features].

Parameters:

Name Type Description Default
inputs ndarray

The input acceleration signal.

required
window_size int

The window size of the sliding window to calculate the average over.

required
wavelet str

The description of the wavelet, e.g. 'sym4'.

'dmey'

Returns:

Type Description
ndarray

The MAC of the input signal which is window_size - 1 shorter.

modwpt(inputs, wavelet, level)

Apply Maximal Overlap Discrete Wavelet Packet Transformation (MODWT) of level to the input.

The wavelet should be a string that can be passed to pywt to construct a wavelet function. For more options call pywt.wavelist. The implementation was inspired by this repository.

Parameters:

Name Type Description Default
inputs ndarray

An input signal of shape [num_windows, window_size, num_features].

required
wavelet str

The description of the wavelet function, e.g. 'sym4'.

required
level int

The decomposition level.

required

Returns:

Type Description
ndarray

The 2**level decompositions stacked in the last axis.

select_features(source, target, num_features)

Select the most transferable features between source and target domain.

30 features are considered: RMS, kurtosis, peak2peak, standard deviation, skewness, margin factor, impulse factor, energy, median absolute, gini factor, maximum absolute, mean absolute, energies of the 16 bands resulting from wavelet packet decomposition, standard deviation of arccosh and arcsinh. If the input has n raw features, n*30 features are extracted.

The dev splits of both domains are used to calculate a distance metric based on Dynamic Time Warping and the Wasserstein Distance. The indices of the num_feature features with the lowest distances are returned.

Parameters:

Name Type Description Default
source AbstractReader

The reader of the source domain.

required
target AbstractReader

The reader of the target domain.

required
num_features int

The number of transferable features to return.

required

Returns:

Type Description
List[int]

The indices of features ordered by transferability.