## 1 Introduction
Judging by the technologies on offer on the milking equipment market, despite the availability of the principles for sensing the milk composition in the cited works, there are no commercial implementations of such sensors. In our work, we propose a prototype sensor for in-line determination of the fat content in milk, which is configured in a cylindrical geometry for compatibility with milk lines. The sensor is based on measuring the angular distribution of the light scattered from milk flowing inside an optically transparent cylindrical glass tube using a laser diode operating at a visible wavelength together with an axial photodiode array. Apart from measuring the content of main milk components, the detection of large-scale impurities with a size > 10 microns, such as somatic cells, is also an urgent task. The proposed technique has the advantage that the same device indicates the presence of abnormality caused by some large-scale impurity particles simultaneously with the measurement of fat content. Our experiments show that starting from a certain concentration level, the presence of large impurities in milk produces a relative change in the intensity of forward scattering compared to pure milk. Thus, such a type of scatterometric sensor is also able to indicate the excess concentration of large impurities above a certain level. Therefore, other conditions being equal, our sensor can be calibrated to estimate the level of somatic cell count (SCC). This sensor is not intended to replace common methods of detecting abnormalities such as conductivity measurement, through the inspection of individual parts of the udder, but provides an additional probabilistic parameter for online monitoring of milk quality with an integrated farm management system. Once the sensor detects an abnormal level of SCC, other, more accurate methods, such as microscopy, should be used to analyze the number of somatic cells more reliably. Our sensing technique has a fairly new methodological feature: in contrast to the common approach in turbidimetry, when the integral light attenuation by a turbid medium is measured, we compare the shapes of the angular distributions of the light scattered by milk with different fat percentages using dimensionless parameters, such as the ratio of the intensity at the side- or forward-scattering angles to the backscattering intensity. Note that various scatterometric schemes have been previously developed for the characterization and control of dispersed media [18; 19; 20; 21; 22]. For example, the sensor designed in [18] for aerosol applications employs a laser emitting at 532 nm and axial photo-receiving geometry, as in our case. In our earlier work [23], we proposed a technique for the simultaneous determination of the percentage of fat and protein using Mueller matrix scatterometry, which requires a milk sampling procedure; the corresponding instrument layout is given in [22]. The novelty of the present work is that, firstly, our design of the scatterometric sensor is proposed specifically for a milk line, although the measurements of milk constituents are limited to fat; secondly, its implementation is simple and cheap.