## Description of the problem

Envelope detection is a procedure used for early detection of faults on ball bearings. When setting up the mathematics in DewesoftX, we get to choose one of the two available calculation types: Filtering or Peak detection. This article was made to elaborate on what the purpose of each of the two mathematical options is, how they differ from one another, which of them is more precise, and how they relate to the Envelope detection procedure itself.

`To enhance the image, either right-click the image directly, which slightly enlarges it, or ''Open image in new tab'' by right-clicking it, which allows you to zoom further into the image.`

## Description of the solution

### What is envelope detection?

Envelope detection is a procedure used in signal processing to extract the envelope of a signal. The envelope is a curve that outlines the peaks (extremes) of a signal.

In general, it involves rectifying the signal- making all values of the signal positive- and then smoothing the signal so that we can eliminate the high-frequency noise, thus allowing us to see the main low frequency with which the ringing (that is a consequence of ball bearing faults) repeats. This envelope extraction is done in the time domain.

### What is Peak detection?

Peak detection is a procedure for detecting peak values in a signal. In essence, Peak detection is a procedure with which we draw a curve around the peaks of the positive part of the signal.

Image: Peak detection calculated envelope of signal compared to the original measured signal.

### What is Filtering?

Filtering is a procedure that uses Low-pass filtering for envelope calculation. It is a standard procedure for calculating the envelope used in other implementations as well.

Image: Filtered envelope of the signal compared to the original measured signal.

### Which procedure is more exact and why?

Peak detection calculates amplitudes more precisely than filtering. This is because we always apply a filter (an IIR filter) when using the Filtering method, which causes the amplitudes of the actual peaks to be reduced.

Additionally, the Peak detection procedure produces a smoother signal in the time domain, as it only finds the peaks of the signal. The filtering method, on the other hand, makes the signal smoother and better-looking in the FFT domain, as it uses the IIR filter.

Image: Peak detection calculated envelope and Filtered envelope of the signal compared to the original measured signal.

Image: A comparison between a Filtered envelope of the signal and Peak detection calculated envelope of the signal, presented as FTT signal of a Log scale.