Using CFAR detector as a filter
Introduction.
When using an ADC, the user may encounter a problem called a conversion error. Errors of this kind occur when the comparator in the ADC does not have time to compare two voltages and its output is one instead of zero or zero instead of one. Let's assume there is some ADC. According to the documentation, the ADC is capable of operating at the maximum frequency and at minimum frequency . At relatively high clock frequencies, close to on the noise recording obtained from the ADC, one can observe the presence of multiple emissions. It will look like in Figure 1.
If you zoom in on the drawing, you can see a single spike in the noise flow (Figure 2).
A single spike in the noise flow is, one might say, a delta function, which in the frequency domain will form a noise shelf across the entire band, thereby reducing the sensitivity of the receiving path (Figure 3).
Classic filtering by smoothing type: arithmetic mean, median filter, running average, etc. can get rid of outliers, but you will have to sacrifice the sampling frequency, which you would like to avoid.
The question arises: how to get rid of emissions without reducing the sampling frequency? Here comes to our aid CFAR detector.
CFAR detector.
Initially, CFAR – is an adaptive algorithm used in radar to detect targets in conditions of noise, interference and signal interference. In radar, the radar signal is known a priori, so matched filtering is used to detect signals reflected from targets. As a result of such filtering, the signal is “compressed”, the peak factor increases. Then, using CFAR detector detects signals against a background of noise. It is important that the algorithm CFAR is designed to detect signals of a specific duration, equal to the duration of the signal after <
Essentially, the algorithm boils down to comparing one cell with others and making a decision: a signal has been detected or not. A more detailed description of the algorithm can be easily found on the Internet, so we will not dwell on it in detail.
Filtering emissions.
If we apply the algorithm CFAR to detect outliers in noise caused by conversion errors, they can be filtered by rewriting the outlier count value with the average value with which the comparison was made in the detector. In this case, signals whose duration differs from one count will not be detected, and therefore will not be filtered. Figure 5 shows the result of the detector operation in the presence of an outlier.
In this case, if there is more than one count above the threshold, then the threshold simply goes around the signal and detection does not occur (Figure 6).
Now let's filter out the outliers using CFAR detector. To do this, we will perform outlier detection and replace the readings with averages. The filtering result is shown in Figure 7.
Comparing Figures 1 and 7, it is clear that the filter copes well with single emissions.
Thus, the application of the noise filtering algorithm based on the transformation CFAR allows you to filter out conversion noise while maintaining the sampling frequency.