Real-time in-situ optical detection of fluid viscosity based on the Beer-Lambert law and machine learning

Opt Express. 2022 Nov 7;30(23):41389-41398. doi: 10.1364/OE.470970.

Abstract

As an important physical quantity to describe the resistance of fluid to flow, viscosity is an essential property of fluids in fluid mechanics, chemistry, medicine, as well as hydraulic engineering. While traditional measurement methods, including the rotating-cylinder method, capillary tube method and falling sphere method, have significant drawbacks especially in terms of accuracy, response time and the sample must be made to move. In this work, a novel Beer-Lambert law-based method was proposed for the viscosity measurement. Specifically, this work demonstrates that viscosity can be quantitatively reflected by spectral line intensity, and castor oil was selected due to its viscous temperature properties (viscosity has been accurately measured under different temperature), and its transmission spectrum at different temperatures ranging from 10 to 50°C was detected firstly. Then, the principal component analysis (PCA) was employed to obtain the intrinsic features of the transmission spectrum. Finally, the processed data was utilized to train and verify the radial basis function (RBF) neural network. As a result, the accuracy of the predictions conducted by means of the RBF reached 98.45%, which indicates the complicated and non-linear relationships between spectra formation and viscosity can be depicted well by RBF. The results show that the real-time in-situ optical detection method adopted in this work represents a great leap forward in the viscosity measurement, which fundamentally reforms the traditional viscosity measurement methods.