


Prepara tus exámenes y mejora tus resultados gracias a la gran cantidad de recursos disponibles en Docsity
Gana puntos ayudando a otros estudiantes o consíguelos activando un Plan Premium
Esta página no es visible en la vista previa
¡No te pierdas las partes importantes!



1. MFPT Dataset Description The notebook starts by introducing the MFPT Bearing Fault Dataset , which contains vibration signals from bearings. Signals were recorded under controlled conditions: low noise, stable rotational speed, and consistent measurements. It includes four main classes: Healthy, Inner Race Fault, Outer Race Fault, and Ball Fault. Since there are more healthy samples than faulty ones, there is a class imbalance , which is later addressed during preprocessing. 2. Comparison with Paderborn Dataset MFPT is simpler than Paderborn because the signals are cleaner, more homogeneous, and easier to analyze. This makes envelope decomposition , delta encoding , and spike generation for spiking neural networks (SNNs) more reliable. Paderborn is more realistic for industrial conditions but adds noise and variability, which makes the pipeline more complex. MFPT is chosen here for easier experimentation. 3. Dataset Organization The MFPT dataset is organized by folder, according to fault type or test condition: 3 files of Healthy (baseline) 3 files of Outer Race Fault 7 files of Outer Race Fault with variable load 7 files of Inner Race Fault with variable load This structure allows automated loading and labeling of data from filenames. 4. Handling Class Imbalance Before generating spikes, techniques are applied to balance the classes: Undersampling: reduces the number of majority class samples. Oversampling: duplicates minority class samples. SMOTE / ADASYN: generates synthetic examples for minority classes. This prevents the SNN from being biased toward the majority class and improves accuracy and generalization. 5. Preprocessing and Segmentation -
Files are loaded (.mat) and normalized to zero mean and unit variance. Signals are segmented into 2048-sample windows with 50% overlap to capture important vibration features. Next, the following transformations are applied: Multichannel envelope decomposition to separate relevant frequency bands. Delta encoding to convert signals into spike trains —discrete events representing amplitude changes.
6. Key Preprocessing Functions delta_encode: converts a continuous signal into positive and negative spikes based on amplitude changes. Env_decomp: extracts and smooths envelopes across multiple frequency bands. signal_augmentation: adds Gaussian noise and small temporal shifts to increase variety for training. 7. MFPT Pipeline A complete pipeline is built that: 1. Loads all signals and segments them into windows. 2. Balances the dataset using the chosen strategy. 3. Splits data into train, validation, and test sets while maintaining class proportions. 4. Generates spike-ready datasets for SNNs. 5. Creates PyTorch DataLoaders for eƯicient batch training. This centralizes the workflow from raw signals to spikes ready for neural networks. 8. PyTorch Spike Dataset The MFPTSpikeDataset class: Converts each window into a delta-encoded spike train. Applies augmentation only during training. Allows checking class distributions and visualizing spike trains as heatmaps. Produces tensors with shape [channels, timesteps], compatible with SNN frameworks. - > The (^) pipeline (^) prepares and^ organizes the data (^) , while packages it^ in^ a^ way that^ the^ network^ can^ use
the entire dataset^ to^ mendy
In this notebook, we prepared the MFPT bearing dataset for training a spiking neural network. We loaded and normalized the vibration signals, cut them into overlapping windows, and converted them into spike trains using envelope extraction and delta encoding. We balanced the classes using diƯerent strategies so the network wouldn’t be biased, then split the data into training, validation, and test sets. Finally, we wrapped everything in PyTorch datasets and DataLoaders, added optional data augmentation, and included visualization tools to check signals and spikes, making the data ready for SNN training.