Smoothing sensor data
Sensor values may be noisy. This can make the distance controller excite the system with oscillations. Filters can help to smooth the input signal and improve the performance of the distance controller.
The following sections describe the effect of the filters and the influence of the individual parameters on the filter effect in a single test. For this test, a millimetre high obstacle approx. 2.8mm high was crossed by a sensor. The distance controller is disabled for this test in order to demonstrate the effect of the filters without any feedback from the distance controller.
The figure below shows the unfiltered sensor data recorded.
When you select a filter, remember that the filters introduce a dead time into the system. For the distance controller, this means a slower reaction to changes in distance. When you configure the filter, you must compromise between filter effect and filter delay.
The aim of configuring the filter is to achieve the best possible smoothing of the measured values when traversing the smooth plane and, at the same time, the lowest possible delay when reacting to an obstacle.
Notice
In order to optimise the performance of the distance control, you can also adjust the PID controller at the same time as you configure a suitable filter.
WARNING
When you configure filters, remember that an enabled distance controller automatically causes a feedback on the filter. This can lead to undesired behaviour of the distance controller and even result in oscillations on the axis.