Design and analysis of a low-cost compensated POF displacement sensor for industrial applications