*3.1. Calibration*

The calibration of the instrument was carried out using a single interface target (aluminum wall), moved by a micrometric slide. In this way, the instrument measures only one peak. The calibration curve is reported in Figure 13: the final range is higher than 4 mm, linearity is guaranteed on all the range and the sensitivity in air is about 1.5 mm/ms. When measuring plastic films, the refractive index *n* should be considered. For the types of plastic normally employed (for example, polyethylene), it is around 1.5.

**Figure 13.** Calibration of low-coherence interferometer (in air). Dots represent measured data while the line is the linear fitting curve. The measurement range of about 4 mm is centered at 25 mm from the output lens (see Figure 8).

## *3.2. Average Algorithm*

The algorithm for calculating film thickness requires an input signal as clean as possible, without disturbances caused by bubble vibrations or by the presence of dyes. For this reason, 10 forward spatial scans are acquired before evaluating the thickness. Subsequently, these scans are aligned since the first peak (recognized with a parabolic regression technique), and then averaged to obtain a signal as independent as possible from the vibrations. The same procedure is carried out with the return spatial scans.

In Figure 14a, we see the trend of 10 forward scans aligned based on the first peak. Due to the vibrations, they will not all be perfectly alike; however, the distance between the peaks, which indicates the thickness of the plastic film, will be kept constant. By averaging the 10 scans, we can eliminate noise and disturbances, as we can see in Figure 14b.

**Figure 14.** (**a**) Ten subsequent acquisitions, aligned on the first peak. Amplitude scale: 100 mV/ division. Horizontal scale: 10 μm/division; (**b**) Average of the acquisitions from Figure 14a. Amplitude scale: 100 mV/division. Horizontal scale: 10 μm/division.

Several algorithms have been tested for the best localization of the peaks: optimal filters, correlation with Gaussian functions, center of gravity. It was noted that the best accuracy and repeatability performances were obtained with a parabolic regression algorithm, applied to 8 points around the maximum. This algorithm has the advantage of being extremely simple and can be easily implemented even on a microcontroller: the analytical solution of linear regression is applied to the derivative of the curve, and the zero of the signal derivative corresponds to the maximum of the peak.

#### *3.3. Measurement on A Real Plant*

The instrument was initially mounted on a fixed location in front of the bubble. The normal vibrations of the bubble do not exceed the 4 mm range of the instrument, so it was possible to carry out a continuous measurement of the film thickness. A very first version of the instrument, modulated at 20 Hz, did not exhibit a stable measurement, while the actual prototype, at 180 Hz, show a series of measurements that move in the measurement range, but once realigned on the first peak, they show a variation of a few micrometers, practically negligible after the 10 averages. Figure 15 shows the two measures during rise and fall of the triangular wave, for 80 μm transparent film. Horizontal scale is already calibrated in micrometers. The measured peaks now are not perfectly symmetric, because the vibration changes the peak position (the scanning speed is much higher than

the vibration speed, but there is still an influence). By averaging 10 measurements, this effect is strongly reduced, but there is still a contribution on the measurement accuracy: the measured standard deviation is about 0.1 μm in laboratory conditions, while on real bubble, it is between 1 μm and 2 μm, depending on the bubble vibration.

**Figure 15.** LabVIEW screenshot of the measurement acquired on a real bubble in a working plant, for a transparent film with thickness 80 μm, during rise (**top**) and fall (**bottom**) of the triangular wave. Amplitude scale: 50 mV/division. Horizontal scale: 25 μm/division. The two vertical lines indicate the position of the peaks, localized by the parabolic regression algorithm.

After a series of positive results on real bubbles, the instrument was mounted on the rotating structure of a commercial capacitive sensor. In this case, the measurement is easier because the contact sensor dampens the natural vibrations of the bubble. In any case, comparable measurement results were obtained by releasing the capacitive sensor (bubble free to vibrate). The comparison of thickness measurement from capacitive and optical sensors is reported in Figure 16: Figure 16a shows the measurement for a transparent film with nominal thickness of 80 μm, as a function of the angle of the rotating stage; Figure 16b shows the measurements acquired during a change of film thickness. The capacitive sensor was automatically disconnected during the change. The small thermal drift of its measurement while touching the film (at angle 180◦) is also evident.

**Figure 16.** Measured thickness during rotation around the bubble. Comparison of capacitive and optical measurements: (**a**) Constant thickness; (**b**) Measurement during a change of film thickness, from 80 μm to 60 μm.
