  Position detection of hydraulic cylinder pistons is crucial for numerous
industrial automation applications. A typical traditional method is to excite
electromagnetic waves in the cylinder structure and analytically solve the
piston position based on the scattering parameters measured by a sensor. The
core of this approach is a physical model that outlines the relationship
between the measured scattering parameters and the targeted piston position.
However, this physical model has shortcomings in accuracy and adaptability,
especially in extreme conditions. To address these limitations, we propose
machine learning and deep learning-based methods to learn the relationship
directly in a data-driven manner. As a result, all deep learning models in this
paper consistently outperform the physical one by a large margin. We further
deliberate on the choice of models based on domain knowledge and provide
in-depth analyses combining model performance with real-world physical
characteristics. Specifically, we use Convolutional Neural Network (CNN) to
discover local interactions of input among adjacent frequencies, apply
Complex-Valued Neural Network (CVNN) to exploit the complex-valued nature of
electromagnetic scattering parameters, and introduce a novel technique named
Frequency Encoding to add weighted frequency information to the model input.
The combination of these techniques results in our best-performing model, a
complex-valued CNN with Frequency Encoding, which exhibits substantial
improvement in accuracy with an error reduction of 1/12 compared to the
traditional physical model.

Signal Processing