You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/algorithms/gedad/how-it-works.md
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,25 +1,25 @@
1
1
# Overview of the GEDAD Algorithm
2
2
3
-
Here we provide a detailed explanation of the Gyroscope Euclidean Distance Anomaly Detection (GEDAD) algorithm, which initially developed for gyroscopes, and now it has been extended to 3-axis accelerometers while retaining its original name. The GEDAD algorithm consists of two core phases: **learning** and **inference**.
3
+
Here we provide a detailed explanation of the **G**yroscope **E**uclidean **D**istance **A**nomaly **D**etection (GEDAD) algorithm, which initially developed for gyroscopes, and now it has been extended to 3-axis accelerometers while retaining its original name. The GEDAD algorithm consists of two core phases: **learning** and **inference**.
4
4
5
-
## Data Acquisition and Pre-processing
5
+
###Data Acquisition and Pre-processing
6
6
7
-
The process begins with data acquisition, the data from a 3-axis accelerometer is collected via I2C and stored in a circular buffer. Before using the data, it undergoes a linear transformation where it is multiplied by a coefficient `alpha`, and added with another coefficient `beta`.
7
+
The process begins with data acquisition. While vibration data is collected from a 3-axis accelerometer via I2C and stored in a circular buffer, later the data undergoes a linear transformation where it is multiplied by a coefficient `alpha`, and added with another coefficient `beta`.
8
8
9
9

10
10
11
11
### Learning Phase
12
12
13
-
The objective of the learning phase is to establish a baseline template of "normal vibration" for the device.
13
+
The objective of the learning phase is to establish a **baseline template of normal vibration** for the measuring device.
14
14
15
15

16
16
17
-
1.**Template Generation**: First, a `sliding Window` of 3-axis acceleration data, sized to cover a complete normal operational cycle, is collected to serve as the **template data**.
18
-
2.**Distance Calculation**: The algorithm then randomly samples `N` short data segments or named `chunks` from identical positions within each channel of the template. Each chunk is then slid across the entire template of its corresponding channel with a defined `sliding Step`, calculating the Euclidean (L2) distance at each position.
19
-
3.**Threshold Calculation**: Next, outliers are filtered from these distances (e.g., using the 3σ rule; specifically, values less than a given EPS). For each channel, the remaining distances are sorted to identify the `M` smallest values. An average "threshold" is then computed for each channel from these `M` distances, defining the boundary between normal and abnormal states.
20
-
4.**Parameter Calibration**: Finally, an additional parameter, `C`, is determined by finding the maximum number of consecutive instances where the Euclidean distance is below the threshold during a subsequent comparison. This parameter is stored to enhance detection accuracy in the next phase.
17
+
1.**Template Generation**: First, a `sliding window` of 3-axis acceleration data, sized to cover a complete normal operational cycle, is collected to serve as the **template data**.
18
+
2.**Distance Calculation**: The algorithm then randomly samples `N` short data segments or named `chunks` from identical positions within each channel of the template. Each chunk is then slid across the entire template of its corresponding channel with a defined `sliding step`, calculating the Euclidean (L2) distance at each position.
19
+
3.**Threshold Calculation**: Next, outliers are filtered from these distances (e.g., using the 3σ rule; specifically, values less than a given EPS). For each channel, the remaining distances are sorted to identify the `M` smallest values. An average **threshold** is then computed for each channel from these `M` distances, defining the boundary between normal and abnormal states.
20
+
4.**Parameter Calibration**: Finally, an additional parameter, `C`, is determined by finding the median counts of consecutive instances where the Euclidean distance is below the threshold during a subsequent comparison. This parameter is stored to enhance detection accuracy in the next phase.
21
21
22
-
####Inference Phase
22
+
### Inference Phase
23
23
24
24
During inference, the algorithm compares real-time 3-axis acceleration data against the established **template data** to identify any vibrations that do not match the normal *fingerprint*.
25
25
@@ -32,7 +32,7 @@ The process is similar to training, but it uses real-time data segments for comp
32
32
33
33
The actual computation is more complex, involving the fusion of anomaly scores across channels and the use of the parameter `C`.
0 commit comments