*2.4. System Calibration*

In order to obtain the correlation between light intensity at the end of the output waveguides and the central wavelength of the narrowband spectrum reflected by the FBG at the AWG input, a wavelength calibration is done, and the results are shown in Figure 3. The setup for the system calibration is largely similar to the one for the battery experiments that are presented in the following section. It mainly consists of the FBG, the AWG, an optical spectrum analyzer (OSA) (AQ6373B, Yokogawa, Tokyo, Japan) and a superluminescent diode (SLED) (EXS210037-01, Exalos, Schlieren, Switzerland). The major difference is that the FBG is not fixed to the battery cell at this point. Instead, the FBG, described in the previous section, is fixed with one end to a manual translational stage (NanoMax-TS Max302/M, Thorlabs, Newton, MA, USA) and with the other end to a rigid post. At a room temperature of 21 ◦C, the FBG is randomly stretched by incrementally moving the translational stage, resulting in a shift of the reflected wavelength between 852.5 nm and 853.25 nm. The broadband light spectrum of the SLED is launched into the fiber beginning and partly reflected at the FBG from where it is guided via a 3dB coupler (FC850-40-50-APC, Thorlabs, Newton, MA, USA) to the input of the AWG. The remaining spectrum, reduced by the reflected spectral range, is transmitted to the end

of the fiber, where the actual FBG wavelength is evaluated by the OSA. This reference value is stored together with the intensities at the three AWG output waveguides, that as a result of the reflected FBG signal at the input, are captured by the CMOS sensor. To minimize possible errors, due to AWG waveguide outputs positioned between two pixels of the CMOS linear image sensor, the intensities of the pixel before and after the aforementioned pixels (407, 486, 565) are also taken into account and an averaged value is calculated.

**Figure 3.** Correlation between center wavelength of the light portion reflected at the fiber Bragg grating (FBG) and the averaged intensities of the CMOS pixels at the AWG output waveguide positions. By using the fitted values as inputs for Equation (1), the green S-ratio course was calculated for channel 1 and 2 and the magenta S-ratio course was calculated for channel 2 and 3, respectively.

Subsequently, the intensities are used to interpolate the course of the AWG output signals with respect to the center wavelength of the light portion reflected by FBG. Finally, according to [37], the ratio between the difference of two adjacent channel intensities over their sum is calculated, as shown in Equation (1), where Ii is the averaged intensity of channel i.

$$\mathbf{S}\_{\mathbf{i}} = (\mathbf{I}\_{\mathbf{i}+1} - \mathbf{I}\_{\mathbf{i}}) / (\mathbf{I}\_{\mathbf{i}+1} + \mathbf{I}\_{\mathbf{i}}) \tag{1}$$

The ratio S is calculated depending on the reflected wavelength and stored with a resolution of 1 pm as a look-up table in the analysis software, in order to obtain an expression for the wavelength that is independent from the power of the light source as well as from the integration time of the CMOS image sensor. The integration time for all experiments presented here is set to 10 ms and usually 50 scans were averaged, thus an overall data acquisition frequency of 2 Hz results.
